Skip to content

Commit c8bafa8

Browse files
committed
Show schedule timezone in first handoff hint ...
... if the display timezone differs.
1 parent ecde52a commit c8bafa8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

application/forms/RotationConfigForm.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ function ($value, $validator) use ($earliestHandoff, $firstHandoff, $latestHando
11501150
if ($actualFirstHandoff < new DateTime()) {
11511151
return $this->translate('The first handoff will happen immediately');
11521152
} else {
1153-
return sprintf(
1153+
$handoffHint = sprintf(
11541154
$this->translate('The first handoff will happen on %s'),
11551155
(new \IntlDateFormatter(
11561156
\Locale::getDefault(),
@@ -1159,6 +1159,14 @@ function ($value, $validator) use ($earliestHandoff, $firstHandoff, $latestHando
11591159
$this->getScheduleTimezone()
11601160
))->format($actualFirstHandoff)
11611161
);
1162+
1163+
$scheduleTimezone = $this->getScheduleTimezone()->getName();
1164+
1165+
if ($this->displayTimezone !== $scheduleTimezone) {
1166+
$handoffHint .= sprintf($this->translate(' (in %s)'), $scheduleTimezone);
1167+
}
1168+
1169+
return $handoffHint;
11621170
}
11631171
})
11641172
));

0 commit comments

Comments
 (0)