Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gap_info_from_local_datetime to get information about a gap #188

Merged
merged 3 commits into from
Jan 20, 2025

Conversation

acrrd
Copy link
Contributor

@acrrd acrrd commented Jan 3, 2025

The function returns information such as the start, offset before the beginning, and the end of the gap.
This will help handle cases where TimeZone::from_local_datetime returns LocalResult::None as discussed in #183 and other use cases mentioned in chronotope/chrono#1448.

This PR doesn't want to implement a variant of from_locale_datetime that returns more information when there is a gap because this interface will be defined in the discussion of #1448.

Close #183

@acrrd
Copy link
Contributor Author

acrrd commented Jan 7, 2025

Rebased on main to make CI pass

chrono-tz/src/timezone_impl.rs Outdated Show resolved Hide resolved
chrono-tz/src/timezone_impl.rs Outdated Show resolved Hide resolved
@djc djc merged commit cc9c6ed into chronotope:main Jan 20, 2025
4 checks passed
@djc
Copy link
Member

djc commented Jan 20, 2025

Thanks!

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.

Get time zone offset around a gap
2 participants