Skip to content

Commit 66b772a

Browse files
committed
Remove times for display timezone
In the dropdown menu in the rotation config form from now on don't show times in the display timezone in parentheses next to the normal time (schedule timezone).
1 parent a0917a6 commit 66b772a

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

application/forms/RotationConfigForm.php

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,30 +1371,12 @@ private function getTimeOptions(): array
13711371
$this->scheduleTimezone
13721372
);
13731373

1374-
$dtzFormatter = new \IntlDateFormatter(
1375-
\Locale::getDefault(),
1376-
\IntlDateFormatter::NONE,
1377-
\IntlDateFormatter::SHORT,
1378-
$this->displayTimezone
1379-
);
1380-
13811374
$options = [];
13821375
$dt = new DateTime('now', new DateTimeZone($this->scheduleTimezone));
13831376
for ($hour = 0; $hour < 24; $hour++) {
13841377
for ($minute = 0; $minute < 60; $minute += 30) {
13851378
$dt->setTime($hour, $minute);
1386-
1387-
if ($this->displayTimezone !== $this->scheduleTimezone) {
1388-
$dtzDt = (clone $dt)->setTimezone(new DateTimeZone($this->displayTimezone));
1389-
1390-
$options[$dt->format('H:i')] = sprintf(
1391-
'%s (%s)',
1392-
$formatter->format($dt),
1393-
$dtzFormatter->format($dtzDt)
1394-
);
1395-
} else {
1396-
$options[$dt->format('H:i')] = $formatter->format($dt);
1397-
}
1379+
$options[$dt->format('H:i')] = $formatter->format($dt);
13981380
}
13991381
}
14001382

0 commit comments

Comments
 (0)