-
Notifications
You must be signed in to change notification settings - Fork 0
Proper timezone handling for schedules #369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
7eb27f2
Remove timeline from schedule list item
jrauh01 1de3675
Add timezone column to schedule model
jrauh01 1ad0885
Schedule creation form: add timezone dropdown
jrauh01 125f32e
Add `TimezonePicker` control
jrauh01 eedc1ca
Add `TimezonePicker` to `ScheduleController`
jrauh01 1982544
Add `ScheduleDateTimeFactory`
jrauh01 2dfbe23
Set timezone for `ScheduleDateTimeFactory`
jrauh01 d2e40b7
Display schedule in chosen timezone
jrauh01 1d28930
Add `TimezoneWarning`
jrauh01 c9b6793
Add `TimezoneWarning` to the modals...
jrauh01 f9af3ec
Use schedule timezone for `RotationConfigForm`
jrauh01 cb81322
Add times for the next day to own option group
jrauh01 382436d
Show times for display timezone
jrauh01 03ff28f
Show schedule timezone in first handoff hint ...
jrauh01 7915a84
Keep display timezone on drag & drop
jrauh01 bd0609c
Adjust timezones for experimental parts
jrauh01 dd30d8a
Use `FormUid` for controls ...
jrauh01 9f79515
Replace `ScheduleDateTimeFactory` ...
jrauh01 7785f40
Use display timezone in rotation ...
jrauh01 2e292c9
Remove extra schedule query in `RotationConfigForm`
jrauh01 8548637
Change timezone source for `TimezonePicker`
jrauh01 e2c7a27
Select schedule timezone via suggestion element
jrauh01 79bffe6
Add first handoff hint in the display timezone
jrauh01 8507064
Remove times for display timezone
jrauh01 61ae8e5
Use session for display timezone
jrauh01 62b216b
Use `RRule->setTimezone()`
jrauh01 b0cef34
Fix flyout weekday
jrauh01 bf12f9f
Change the way flyouts get timezones
jrauh01 8146c8c
Use timeperiod entry timezone for `RRule`
jrauh01 b62d1b2
Remove `ScheduleTimezoneStorage`
jrauh01 ff39b69
Fix `TimezonePicker` css classes
jrauh01 d988517
Move session handling to `ScheduleController`
jrauh01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| <?php | ||
|
|
||
| /* Icinga Notifications Web | (c) 2025 Icinga GmbH | GPLv2 */ | ||
|
|
||
| namespace Icinga\Module\Notifications\Controllers; | ||
|
|
||
| use DateTime; | ||
| use DateTimeZone; | ||
| use IntlTimeZone; | ||
| use ipl\Web\Compat\CompatController; | ||
| use ipl\Web\FormElement\SearchSuggestions; | ||
| use Throwable; | ||
|
|
||
| class SuggestController extends CompatController | ||
| { | ||
| public function timezoneAction(): void | ||
| { | ||
| $suggestions = new SearchSuggestions((function () use (&$suggestions) { | ||
| foreach (IntlTimeZone::createEnumeration() as $tz) { | ||
| try { | ||
| if ( | ||
| (new DateTime('now', new DateTimeZone($tz)))->getTimezone()->getLocation() | ||
| && $suggestions->matchSearch($tz) | ||
| ) { | ||
| yield ['search' => $tz]; | ||
| } | ||
| } catch (Throwable) { | ||
| continue; | ||
| } | ||
| } | ||
| })()); | ||
|
|
||
| $this->getDocument()->addHtml($suggestions->forRequest($this->getServerRequest())); | ||
| } | ||
| } |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.