Skip to content

Commit b8ed414

Browse files
committed
Show 'UTC' instead of the long name
1 parent ed9e06b commit b8ed414

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Twig/TwigExtension.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,11 @@ public function dateRange(
228228
$sameDay = $start->format('Y-m-d') === $end->format('Y-m-d');
229229
//$timezone = $this->intl->getTimezoneName($tz, $locale);
230230
//$timezone = $this->intl->formatDate($this->twig, $start, 'short', 'zzz', $tz, 'gregorian', $locale);
231-
$timezone = $this->intl->formatDate($this->twig, $start, 'short', 'zzzz', $tz, 'gregorian', $locale);
231+
if ($tz == 'UTC' || $tz == 'Etc/UTC') {
232+
$timezone = 'UTC';
233+
} else {
234+
$timezone = $this->intl->formatDate($this->twig, $start, 'short', 'zzzz', $tz, 'gregorian', $locale);
235+
}
232236
//$timezone = $start->format('T');
233237
return $this->translator->trans(
234238
'events.date_range',

0 commit comments

Comments
 (0)