-
Notifications
You must be signed in to change notification settings - Fork 44
potential solution for roundtrip issue with microseconds (issue #187) #188
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
Conversation
spencerkclark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jswhit -- I think this makes sense. It does prevent exact roundtripping with non-microsecond units in the case when dates truly are near the second boundary -- e.g. roundtripping cftime.DatetimeNoLeap(2000, 1, 1, 0, 0, 0, 999999) with units of "days since 2000-01-01" -- but this is probably rarer than the issue in #187.
spencerkclark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix included for calculation of leap years when year is negative
Good catch, thanks!
Co-authored-by: Spencer Clark <[email protected]>
closes #187 and #189