Display the current timezone in date time picker fields

This commit is contained in:
Hypolite Petovan 2021-10-03 13:42:17 -04:00
parent a9bb53b021
commit a31a64827f

View File

@ -271,7 +271,11 @@ class Temporal
$id, $id,
$label, $label,
$input_text, $input_text,
'', DI::l10n()->t(
'Time zone: <strong>%s</strong> <a href="%s">Change in Settings</a>',
str_replace('_', ' ', DI::app()->getTimeZone()) . ' (GMT ' . DateTimeFormat::localNow('P') . ')',
DI::baseUrl() . '/settings'
),
$required ? '*' : '', $required ? '*' : '',
'placeholder="' . $readable_format . '"' 'placeholder="' . $readable_format . '"'
], ],
@ -284,7 +288,7 @@ class Temporal
'lang' => $lang, 'lang' => $lang,
'minfrom' => $minfrom, 'minfrom' => $minfrom,
'maxfrom' => $maxfrom, 'maxfrom' => $maxfrom,
] ],
]); ]);
return $o; return $o;