Skip to content

Resolve crash on parsing timezone aware date time within DST transition gap #43

Merged
gregjoy1 merged 13 commits intomainfrom
feature/resolve-timezone-issues
Mar 17, 2025
Merged

Resolve crash on parsing timezone aware date time within DST transition gap #43
gregjoy1 merged 13 commits intomainfrom
feature/resolve-timezone-issues

Conversation

@gregjoy1
Copy link
Owner

This PR resolves a crash when a date time property with a timezone specified and a date string within a DST transition is parsed. The current strategy is to validate against this and prompt the client to resubmit the property as either UTC or adjusted DST adjusted.

An example of this would be DTSTART;TZID=Pacific/Auckland:20240929T020000 which does not really exist as it's DST transitions to DTSTART;TZID=Pacific/Auckland:20240929T030000.

In the future we can handle this better by making an assumption about the DST gap end time to proceed with. Ideally we we could lean on the chrono_tz GapInfo facility introduced by this PR (chronotope/chrono-tz#188). Unfortunately this has not been included in a release yet and in an effort to keep things simple and stable for now we will proceed with this the validation strategy as we iron out other creases within the RediCal module.

gregjoy1 and others added 13 commits March 13, 2025 14:23
This function checks if the provided `DateTime` can be represented in
the timezone without ambiguity, such as during daylight saving time
transitions.
This function checks if the provided `DateTime` can be represented in
the timezone without ambiguity, such as during daylight saving time
transitions.
This function checks if the provided `DateTime` can be represented in
the timezone without ambiguity, such as during daylight saving time
transitions.
This function checks if the provided `DateTime` can be represented in
the timezone without ambiguity, such as during daylight saving time
transitions.
This function checks if the provided `DateTime` can be represented in
the timezone without ambiguity, such as during daylight saving time
transitions.
This function checks if the provided `DateTime` can be represented in
the timezone without ambiguity, such as during daylight saving time
transitions.
@gregjoy1 gregjoy1 merged commit 3f77ac2 into main Mar 17, 2025
8 checks passed
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.

1 participant