-
Notifications
You must be signed in to change notification settings - Fork 531
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
Debug
impl of DateTime
can panic
#1047
Comments
I am trying to figure out what is the least hacky way to prevent panics for
Methods that return
And I suppose there are some issues in parsing. |
I think a lot of this is fixable.
Is there something against restricting the range of values in |
Better to make the range a full year smaller. Having the minimum date be January 2 and the maximum date December 30 is just strange. |
If the timestamp of a
DateTime
is near the end of the range ofNaiveDateTime
and the offset pushes the timestamp beyond that range, theDebug
implementation can panic.This is extra fun when the panic happens while panicking, where you may want to write the debug value of the
DateTime
. (i.e.(signal: 6, SIGABRT: process abort signal)
).The text was updated successfully, but these errors were encountered: