projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Security update for Core, with self-updated composer
[yaffs-website]
/
web
/
core
/
modules
/
views
/
src
/
Plugin
/
views
/
field
/
Date.php
diff --git
a/web/core/modules/views/src/Plugin/views/field/Date.php
b/web/core/modules/views/src/Plugin/views/field/Date.php
index 37455cc783fcfcbda0bf2ef66a2a61be7ca8a000..ee38a4a6c3d077de4f7f14a65bb09c51ea046a4e 100644
(file)
--- a/
web/core/modules/views/src/Plugin/views/field/Date.php
+++ b/
web/core/modules/views/src/Plugin/views/field/Date.php
@@
-119,7
+119,7
@@
class Date extends FieldPluginBase {
'#type' => 'select',
'#title' => $this->t('Timezone'),
'#description' => $this->t('Timezone to be used for date output.'),
'#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) {
'#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;
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]);
switch ($format) {
case 'raw time ago':
return $this->dateFormatter->formatTimeDiffSince($value, ['granularity' => is_numeric($custom_format) ? $custom_format : 2]);