Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / views / src / Plugin / views / field / Date.php
index 37455cc783fcfcbda0bf2ef66a2a61be7ca8a000..ee38a4a6c3d077de4f7f14a65bb09c51ea046a4e 100644 (file)
@@ -119,7 +119,7 @@ class Date extends FieldPluginBase {
       '#type' => 'select',
       '#title' => $this->t('Timezone'),
       '#description' => $this->t('Timezone to be used for date output.'),
-      '#options' => ['' => $this->t('- Default site/user timezone -')] + system_time_zones(FALSE),
+      '#options' => ['' => $this->t('- Default site/user timezone -')] + system_time_zones(FALSE, TRUE),
       '#default_value' => $this->options['timezone'],
     ];
     foreach (array_merge(['custom'], array_keys($date_formats)) as $timezone_date_formats) {
@@ -143,7 +143,9 @@ class Date extends FieldPluginBase {
 
     if ($value) {
       $timezone = !empty($this->options['timezone']) ? $this->options['timezone'] : NULL;
-      $time_diff = REQUEST_TIME - $value; // will be positive for a datetime in the past (ago), and negative for a datetime in the future (hence)
+      // Will be positive for a datetime in the past (ago), and negative for a
+      // datetime in the future (hence).
+      $time_diff = REQUEST_TIME - $value;
       switch ($format) {
         case 'raw time ago':
           return $this->dateFormatter->formatTimeDiffSince($value, ['granularity' => is_numeric($custom_format) ? $custom_format : 2]);