Hi,
Support for microseconds was added late in the 7.1 RC cycle, however is
has some issues:
1. There is no easy way to set microseconds to 0, you have to call
setTime see https://3v4l.org/YUhFF A setMicroseconds method would be
handy and/or support to relative strings to set microseconds to 0 (just
like midnight does for H:i:s). Or am I missing something?
2. Microsecond support is useful, by not by default I think. Why not
introduce a 3rd parameter $with_microseconds/$set_microseconds which
defaults to false? Or A second class DateTimeWithMicroseconds? Maybe not
so fancy naming, but it's very clear what will happen.
3. The 4th parameter to setTime() should not cause BC breakage.
This discussion was started at https://github.com/php/php-src/pull/2186
Gr Arjen
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php