Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96765 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6498 invoked from network); 8 Nov 2016 09:45:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Nov 2016 09:45:03 -0000 Received: from [127.0.0.1] ([127.0.0.1:18771]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id EB/92-05967-F9E91285 for ; Tue, 08 Nov 2016 04:45:03 -0500 X-Host-Fingerprint: 77.165.170.254 ip4da5aafe.direct-adsl.nl Received: from [77.165.170.254] ([77.165.170.254:16696] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 46/92-05967-9AB91285 for ; Tue, 08 Nov 2016 04:32:25 -0500 Message-ID: <46.92.05967.9AB91285@pb1.pair.com> To: internals@lists.php.net X-Mozilla-News-Host: news://news.php.net:119 Date: Tue, 8 Nov 2016 10:32:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 77.165.170.254 Subject: DateTime microseconds discussion From: arjen@parse.nl (Arjen Schol) 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