mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 22:50:38 +03:00
![]() ISO 8601 says that it's up to the application to decide how many digits to put in the fractional seconds if they're present. SysTime.to*String puts up to 7 (stripping trailing zeroes), because that's hecto-nanosecond precision, and SysTime holds the time in hecto-nanoseconds. Currently, from*String only accepts up to 7 digits in the fractional seconds, which _does_ follow the spec in that (per the spec) the number of digits is up to the applications. However, while we never emit more than 7 digits, other applications do, so only accepting 7 digits makes us incompatible with them, whereas accepting them would make us more compatible with other programs, and it would actually be more efficient, since we'd have fewer checks in the code. So, these changes make is so that SysTime.from*String accepts more than 7 digits in the fractional seconds, but the additional digits are truncated (since SysTime doesn't support more than 7 digits of precision). |
||
---|---|---|
.. | ||
date.d | ||
interval.d | ||
package.d | ||
systime.d | ||
timezone.d |