-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix leap second validation when parsing time_point
s
#2705
Fix leap second validation when parsing time_point
s
#2705
Conversation
1. Fixed `utc_time` parsing incorrectly accepting invalid 60th second values (e.g. 00:00:60) 2. Removed leap second validation in `sys_time` parsing. It now accepts 23:59:59 even if it is deleted by a negative leap second, which can be represented as a `sys_time` value but doesn't physically exist in UTC. 3. Merged leap second validation and correction code to avoid looking up the leap second table twice.
Changes the code and comments to match the cutoff date. Also changes date format to ISO 8601 for consistency with other comments.
…ithout-leap-second-check
I've pushed a conflict-free merge with |
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.
Other than the nit, this looks good to me.
Requested changes have been made
I've pushed a couple of small commits to combine Nicole's clarity improvement (of handling the error case first, before we forget what we tested) with |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks! That's one small step for a PR, one giant leap second for C++ |
Co-authored-by: Stephan T. Lavavej <[email protected]> Co-authored-by: Nicole Mazzuca <[email protected]>
utc_time
parsing incorrectly accepting invalid 60th second values (e.g. 00:00:60)sys_time
parsing. It now accepts 23:59:59 even if it is deleted by a negative leap second, which can be represented as asys_time
value but doesn't physically exist in UTC.Fixes #2163. Fixes #2698.