-
Notifications
You must be signed in to change notification settings - Fork 7
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 a fallible timezone conversion method #22
Comments
I've updated the docs in master and added a new checked_to_timezone function.
Well since in master I've moved to_timezone to its own trait (not sealed) it's now a breaking change, fortunately it's only a breaking change from 1 pre-release to another (master is on |
Ah! So now the unchecked method can be provided in the trait by default, implemented through the checked method. |
Not exactly because of the |
The
to_timezone
method returnsOffsetDateTime
. Its implementation usesOffsetDateTime::to_offset
which may panic if the resulting date is out of range. There is also the fallibleOffsetDateTime::checked_to_offset
, so it would be nice to provide a checked time zone conversion method using that, for people concerned about the Y10K problem 😁Since the extension trait is sealed, a new method can be added as a non-breaking change.
The text was updated successfully, but these errors were encountered: