forked from rust-lang/rust
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add fractional second support to str{p,f}time
The ISO 8601 standard does not mandate any specific precision for fractional seconds, so this accepts input of any length, ignoring the part after the nanoseconds place. It may be more correct to round with the tenths of nanoseconds digit, but then we'd have to deal with carrying the round through the entire Tm struct (e.g. for a time like Dec 31 11:59.999999999999). %f is the format specifier that Python's datetime library uses for 0-padded microseconds so it seemed appropriate here. cc rust-lang#2350
- Loading branch information
Showing
1 changed file
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3c30ecb
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.
r+, thanks!
I think we're OK just chopping it off for now,
3c30ecb
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.
@bors: retry