Skip to content

Commit

Permalink
Show 'UTC' instead of the long name
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-gui committed Oct 2, 2024
1 parent ed9e06b commit b8ed414
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Twig/TwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,11 @@ public function dateRange(
$sameDay = $start->format('Y-m-d') === $end->format('Y-m-d');
//$timezone = $this->intl->getTimezoneName($tz, $locale);
//$timezone = $this->intl->formatDate($this->twig, $start, 'short', 'zzz', $tz, 'gregorian', $locale);
$timezone = $this->intl->formatDate($this->twig, $start, 'short', 'zzzz', $tz, 'gregorian', $locale);
if ($tz == 'UTC' || $tz == 'Etc/UTC') {
$timezone = 'UTC';
} else {
$timezone = $this->intl->formatDate($this->twig, $start, 'short', 'zzzz', $tz, 'gregorian', $locale);
}
//$timezone = $start->format('T');
return $this->translator->trans(
'events.date_range',
Expand Down

0 comments on commit b8ed414

Please sign in to comment.