Repository navigation
Fix V2 recurrence instants across host timezones - #195
Merged
Merged
Conversation
thedhanawada
marked this pull request as ready for review
October 2, 2026 11:51
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.
A UTC daily series starting at 09:00Z changes to 10:00Z after a host DST transition in core 2.5.6 when run in America/Los_Angeles. The 365-day reproducer has 59 wrong-hour results. V2 now performs calendar steps, arithmetic seeks, floating rule dates and date-based exception matching in the selected recurrence zone. Bounds and iterators use the resulting instants without a second DST adjustment.
Compatibility scope: native Date gap/fold calendar-setter behavior is retained in the event zone, and duration stays end minus start. handleDST remains accepted but true/false converge because stepping already resolves transitions. Legacy Event wall-clock conversions and V2 startUTC/endUTC metadata are unchanged and may remain host-dependent; use start/end for the corrected occurrence instants. The complete contract and limitations are documented in docs/recurrence-timezones.md.
Validation: UTC and Melbourne full suites 26/26 plus declaration checks; 174 independent native-Date fixtures on four hosts (696 combinations) across six event zones; interface 291 tests; 40 independent benchmark timestamp-parity checks; quality/formatting pass with four pre-existing lint warnings. LA and Kolkata full suites each pass 25/26; the sole remaining failures reproduce on unmodified 2.5.6 (LA legacy timezone conversions; Kolkata V1 ancient-series transition handling). Tests replace legacy-engine or host-local expected values with independent oracles where those expectations conflict with explicit event-zone behavior.
No version change or release in this draft. Proposed patch release after exact-head CI and review; docs-only PR193 remains held.