Repository navigation
preserve explicit calendar alarm timezones - #67239
yezhengli-Mr9 wants to merge 2 commits into
Conversation
Explicit UTC alarm timestamps were being reinterpreted in the calendar timezone, delaying reminders by eleven hours in Pacific/Pago_Pago. Restrict the calendar-timezone fallback to floating dates and keep recurrence filtering consistent with stored reminder times. Assisted-by: Copilot:gpt-6.1-sol Signed-off-by: Yezheng Li <liyezheng@microsoft.com>
|
/backport to stable35 |
|
/backport to stable34 |
|
/backport to stable33 |
DerDreschner
left a comment
There was a problem hiding this comment.
Thanks for the PR. One blocker: timezones that Sabre can't resolve (e.g. Outlook's FLE Standard Time, Europe/Kiev, Customized Time Zone) end up as UTC but aren't floating, so they no longer get the calendar timezone. A 09:00 FLE Standard Time event with -PT1H in a Europe/Helsinki calendar is due at 08:00Z instead of 06:00Z (correct on master). getEventObject() also rewrites the date, so please decide on the stored event: keep the UTC check and skip the conversion only if the stored date is explicitly UTC.
Please also add tests for these timezones, RELATED=END with mixed floating/zoned dates, and expired alarms in the master loop and in exceptions. Reverting those lines currently keeps all tests green.
Assisted by ClaudeCode:claude-opus-5-5
|
Adding to the review above: unresolvable timezones aren't limited to Outlook's Windows names. They also include custom timezones that are valid under RFC 5545, i.e. a For example, this event in a Europe/Helsinki calendar is due at 06:00Z on master and at 08:00Z with this PR: Outlook/Exchange sends exactly this, so it's common in practice. Master only gets it right because the calendar's timezone usually matches the user's own zone, but the PR would break it for everyone. The approach suggested above handles this too: keep the fallback and skip it only when the stored date is explicitly UTC (a |
Sabre recurrence expansion can rewrite an unresolved TZID as UTC. Inspect the stored event date before exempting explicit UTC alarms from the calendar-timezone fallback, so Outlook and custom VTIMEZONE reminders retain their prior scheduling. Reuse the resolved timestamp for filtering and storage to keep expiry decisions consistent. Assisted-by: Copilot:gpt-6.1-sol Signed-off-by: Yezheng Li <yezhengli9@outlook.com>
Thanks, let me double check. |
Review overview
Preserve explicit UTC calendar alarm timestamps while retaining the existing fallback for floating/unresolved timezones.
Validation and evidence
Related issues, work items, and PRs
Original detailed description, reproduction, and repository checklist
Summary
UTC is an explicit timezone, not an indication that an event is floating. Reminder scheduling currently reinterprets UTC alarm timestamps in the calendar timezone. In a Pacific/Pago_Pago calendar this delays an alarm by eleven hours.
Keep the calendar-timezone fallback when Sabre returns UTC for floating or unresolved timezones, but skip it when the stored source date explicitly specifies UTC (
Z,UTCorEtc/UTC). Inspect the stored event because recurrence expansion can rewrite an unresolved TZID as UTC. Preserve absolute trigger timestamps and reuse the resolved timestamp for filtering and storing reminders.Validation
Tests added in response to human review
Follow-up commit 393ca22 adds 12 parameterized unit-test cases to the original PR: ten creation/expiry cases and two recurring-reminder cases. The full reminder suite increased from 70 tests / 641 assertions to 82 tests / 743 assertions. These are local results, not a claim that upstream CI has passed.
Requests: DerDreschner's review and SebastianKrupinski's embedded-timezone example. The committed cases are in ReminderServiceTest.php, under
provideAlarmTimeZones()andprovideRecurringAlarmTimeZones().FLE Standard TimeFLE Standard Timecreation case in a Europe/Helsinki calendarEurope/KievEurope/Kievcreation case in Europe/Helsinkitzdata-legacy.Customized Time ZoneVTIMEZONECustomized Time Zonecreation case uses the supplied STANDARD/DAYLIGHT definition;custom timezonerecurring case exercises later schedulingunresolved timezoneandcustom timezonerecurring cases; a deterministicUnresolvable Time Zonecreation caseRELATED=ENDwith mixed floating/zoned datesUTC start floating endandfloating start UTC endexpired floating masterin Europe/Helsinkiexpired UTC alarmcase is retained, not newly added.expired floating exceptionandexpired UTC exceptionZ,UTC,Etc/UTC)Etc/UTC TZIDcaseUTC start(Z) andUTC TZIDalready existed and remain covered; they are not counted as new cases.All source links are pinned to the reviewed commit:
Scope: this restores the existing unresolved/custom-timezone fallback; it does not implement general custom-VTIMEZONE parsing or guarantee correct interpretation when the event's unresolved timezone differs from the calendar's timezone. The table distinguishes committed tests from live checks and mutation experiments.
To reproduce, create a calendar with timezone Pacific/Pago_Pago and a future event with an explicitly UTC DTSTART and a relative alarm. A 09:00Z event with a one-hour advance alarm must queue a reminder for 08:00Z, not 19:00Z. Repeat with RELATED=END and DTEND or DURATION, and with an absolute UTC trigger.
Unit tests:
Related timezone discussions: #43113, #39640 and #36192. This patch does not claim to resolve every case in those discussions. #50867 concerns reminder-recipient selection rather than trigger timezone calculation and is outside this change.
TODO
Current published revision:
393ca22b788830701b2d41717a995e8f06aced89. DCO has passed. All 26 Actions workflows currently reportaction_requiredbefore any jobs run, awaiting upstream maintainer approval; the new upstream pipelines have not passed yet. Relevant runs: PHPUnit and Psalm.Checklist
AI (if applicable)
Copilot SDK in VS Code, using model
gpt-6.1-sol, assisted with the implementation, tests, Docker experiments and PR text. Each assisted commit includes the requiredAssisted-by: Copilot:gpt-6.1-soltrailer.