]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #9016 : sfackler/rust/nanoseconds, r=alexcrichton
authorbors <bors@rust-lang.org>
Sat, 7 Sep 2013 05:25:59 +0000 (22:25 -0700)
committerbors <bors@rust-lang.org>
Sat, 7 Sep 2013 05:25:59 +0000 (22:25 -0700)
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 #2350


Trivial merge