Repository navigation
test(timeutil): use 2025 historical Havana fall-back sample - #701
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Owner
|
Thanks for the fix! Could we use the historical Havana fall-back date 2025-11-02 instead of 2027-11-07? Both tzdb 2025b and the current upstream rules include this transition. It preserves the original repeated-midnight / 25-hour-day coverage without depending on a future transition that could change again: // Use a historical fall-back day with a repeated midnight.
{"America/Havana", "2025-11-02", "2025-11-02T00:00:00-04:00", "2025-11-03T00:00:00-05:00"},The underlying fix makes sense; this would make the replacement sample more stable. |
Moraxyc
force-pushed
the
test-timeutil-fix
branch
from
November 11, 2026 02:08
9c41524 to
1a1533a
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.
Summary
TestDayBoundsUsesRealCalendarDateasserts thatAmerica/Havanafalls back from-04to-05on2026-11-01. The IANA tz database longer has that transition, so the test fails against current tzdata even thoughDayBoundsreturns the correct result.Background
The unreleased section of the tz
NEWSfile says:The
northamericarules now have no November transition for 2026, and the next fall-back is 2027-11-07 (Rule Cuba 2027 max - v Sun>=1 0:00s 0 S).Reproduction
With tzdata compiled from upstream tz HEAD (
eb40bc6, 2026-11-08) andZONEINFOpointing at it:Suggest
This test hard-codes expected transitions from one tzdata version, so it is brittle and will need updating whenever tzdata changes these rules; a fixture-based or invariant-based test would be more robust.