Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / serialization / serialization.install
index 6620b446efc7626a912acd389d5d01d7a92de318..f5a11b88052faafff4b4ef043da0d69938598a89 100644 (file)
@@ -33,7 +33,8 @@ function serialization_requirements($phase) {
 /**
  * @see hal_update_8301()
  */
-function serialization_update_8301() {}
+function serialization_update_8301() {
+}
 
 /**
  * Add serialization.settings::bc_primitives_as_strings configuration.
@@ -46,3 +47,12 @@ function serialization_update_8302() {
 
   return t('The REST API will no longer output all values as strings. Integers/booleans will be used where appropriate. If your site depends on these value being strings, <a href="https://www.drupal.org/node/2837696">read the change record to learn how to enable the BC mode.</a>');
 }
+
+/**
+ * Enable BC for timestamp formatting: continue to return UNIX timestamps.
+ */
+function serialization_update_8401() {
+  $config_factory = \Drupal::configFactory();
+  $serialization_settings = $config_factory->getEditable('serialization.settings');
+  $serialization_settings->set('bc_timestamp_normalizer_unix', TRUE)->save(TRUE);
+}