Skip to content

Resolve date-time DST transition ambiguities and gaps#52

Merged
gregjoy1 merged 11 commits into
mainfrom
feature/resolve-dst-tranisition-gap
Apr 8, 2026
Merged

Resolve date-time DST transition ambiguities and gaps#52
gregjoy1 merged 11 commits into
mainfrom
feature/resolve-dst-tranisition-gap

Conversation

@gregjoy1
Copy link
Copy Markdown
Owner

@gregjoy1 gregjoy1 commented Apr 6, 2026

This resolves the previously unhandled case where the following raised an error:

  • DTEND;TZID=Europe/London:20261025T011500 DST shift ambiguity
  • DTEND;TZID=Pacific/Auckland:20240929T023000 DST shift gap

Now DTEND;TZID=Europe/London:20261025T011500 now parses successfully (ambiguous fall-back, accepted as-is). And gap times like DTEND;TZID=Pacific/Auckland:20240929T023000 are auto-adjusted forward to 03:30.

This also updates the following dependencies:

  • chrono
  • chrono-tz
  • rrule

Please review

gregjoy1 added 10 commits April 6, 2026 15:51
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.
Copy link
Copy Markdown
Collaborator

@henrahmagix henrahmagix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Comment thread Cargo.toml Outdated
@@ -10,8 +10,8 @@ serde = { version = "1.0.162", features = ["derive"] }
libc = "0.2"
nom = "6.0"
rrule = { version = "0.10", features = ["serde", "exrule"] }
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 🧐 😄

@gregjoy1 gregjoy1 merged commit 3fec959 into main Apr 8, 2026
8 checks passed
@gregjoy1 gregjoy1 deleted the feature/resolve-dst-tranisition-gap branch April 8, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants