Resolve date-time DST transition ambiguities and gaps#52
Merged
Conversation
Bumps chrono 0.4.19→0.4, chrono-tz 0.6.1→0.10, rrule 0.10→0.14. Removes now-unused lifetime parameter from EventOccurrenceIterator since RRuleSetIter no longer borrows.
Replaces validate_with_datetime_value with resolve_dst_transition which accepts ambiguous times and adjusts gap times forward per industry convention. Removes old validation calls from all property validate() methods.
Replaces .unwrap() with .earliest().unwrap() on all from_local_datetime calls so ambiguous fall-back times pick the pre-transition offset instead of panicking.
henrahmagix
approved these changes
Apr 7, 2026
| @@ -10,8 +10,8 @@ serde = { version = "1.0.162", features = ["derive"] } | |||
| libc = "0.2" | |||
| nom = "6.0" | |||
| rrule = { version = "0.10", features = ["serde", "exrule"] } | |||
Collaborator
There was a problem hiding this comment.
I'm unsure how rust dependencies work, but shouldn't the top-level package rrule dependency 0.10 match the redical_core package 0.14?
Owner
Author
There was a problem hiding this comment.
Great point! 🙂 This is actually not used as the redical_core crate specifies 0.14 explicitly but it does add confusion 🤔 I will remove it now. Massive thanks for your beady eyed review 🧐 😄
henrahmagix
approved these changes
Apr 7, 2026
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 resolves the previously unhandled case where the following raised an error:
DTEND;TZID=Europe/London:20261025T011500DST shift ambiguityDTEND;TZID=Pacific/Auckland:20240929T023000DST shift gapNow
DTEND;TZID=Europe/London:20261025T011500now parses successfully (ambiguous fall-back, accepted as-is). And gap times likeDTEND;TZID=Pacific/Auckland:20240929T023000are auto-adjusted forward to03:30.This also updates the following dependencies:
chronochrono-tzrrulePlease review