Merged
Conversation
efafe1d to
1b6de94
Compare
229f6a8 to
edfee49
Compare
18670a3 to
bb75f8d
Compare
nilmerg
requested changes
Oct 29, 2025
8e83df5 to
eaecd7b
Compare
Contributor
|
Some timezones from Please make sure the daemon also supports these time zones, or filter out unsupported ones to avoid runtime errors. |
nilmerg
requested changes
Nov 3, 2025
ffe5cb7 to
b8a9709
Compare
nilmerg
requested changes
Nov 6, 2025
aa87261 to
5ea4e7b
Compare
nilmerg
requested changes
Nov 10, 2025
5ea4e7b to
a7b76af
Compare
A Widget that represents a warning if the display timezone differs from the schedule timezone. It's used for the forms to add and edit rotations.
...if the display timezone differs from the schedule timezone.
Use the schedule timezone to configure rotations. All times entered are handled in the schedule timezone.
This is because we want to remove the parentheses for future changes where those should be used to display a time in another timezone.
In the dropdown menu in the rotation config form show times in the display timezone in parentheses next to the normal time (schedule timezone).
... if the display timezone differs.
... to prevent the schedule view mode switcher resetting the timezone picker.
... by `ScheduleTimezoneStorage`. This just stores the display and schedule timezone, instead of creating `DateTime` objects.
... instead using schedule timezone.
Some timezones from `DateTimeZone::listIdentifiers()` are not compatible with the `IntlDateFormatter`. So now we get the timezones from `IntlTimeZone::createEnumeration()`. This provides timezones of **type 2 and 3**. Type 2 timezones cause problems, so we want to filter them out. To make sure we only get timezones from **type 3**, we check if they have a location. (Only type 3 timezones have a location).
Show the first handoff in the display timezone if it differs to the schedule 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).
Instead of using an url param that has to be preserved by every link, form action or redirect, we now use the 'notifications' session namespace to store the display timezone for the current user. The start day for the timeline now comes from the controller, no longer from the schedule detail controls.
If the entries shift to another weekday in the display timezone the flyouts have to point this out. For that we shift the days array for **partial** mode rotations or the start and end days for **multi** mode rotations.
The schedule timezone is set on the entry and then passed to `FlyoutEntry::generateAndSetRotationInfo()` as argument. The display timezone is set via the constructor.
Because it's nowhere used anymore.
Instead of handling the session in `TimezonePicker`.
b9b55fe to
d988517
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces timezone support for schedules. It relies on the
schedule.timezonecolumn in the database added in Icinga/icinga-notifications#344.For the following explanation, it is important to understand the difference between schedule and display timezone.
Schedule List
The timeline part has been removed completely, so that we don't have to create a header for each schedule which wouldn't be very well readable.
Schedule Creation
The form to create a new schedule now has a suggestion input to choose the timezone the schedule will be created for. Once created, the timezone cannot be changed via the web UI, because the suggestion input won't be displayed for the
editAction(). This is ensured with a bool$showTimezoneSuggestionInputin theScheduleFormwhich defaults tofalse. The default of the suggestion input is the timezone configured in the the user preferences. The value of the suggestion input will be stored in theschedule.timezonecolumn.ScheduleTimezoneStorage
The
ScheduleTimezoneStorageis a util storage class which stores the schedule timezone globally. The schedule timezone is set in theScheduleController::indexAction().Schedule Detail View
The timeline start is in the display timezone and is passed to the
ScheduleDatailin theScheduleController::indexAction(). Therotation.actual_handoffandtimeperiod_entry.start_timeare stored as unix timestamps, so the entries are displayed correctly in the timeline grid. Additionally all date formatters are constructed with the display timezone, so all titles are displayed correctly for the user's choice.The user changes the display timezone via a dropdown control called
TimezonePicker. This may be change in the future.Rotation Config Form
All configurations in the form are done in the schedule timezone, no matter what display timezone is chosen. The
RotationConfigFormis constructed with both the display and schedule timezone. If the display timezone differs following will happen:The dropdowns to select times did show 'Next Day' hints earlier. This logic has been replaced by an own option group for next day elements.
Requires Icinga/icinga-notifications#344
Requires Icinga/ipl-scheduler#55
Fixes #273