Re: DateTime microseconds discussion
| From: | Lester Caine | Date: | Tue, 08 Nov 2016 22:03:36 +0000 |
| Subject: | Re: DateTime microseconds discussion | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-96780@lists.php.net to get a copy of this message | ||
On 08/11/16 12:46, Derick Rethans wrote:
>> Support for microseconds was added late in the 7.1 RC cycle, however is has
>> > some issues:
> Some *additional* support for microseconds was added in the PHP 7.1
> cycle, mostly to support bug fixes that have been around for a long
> time.
We had a similar problem when the resolution of time from Firebird was
increased from milliseconds to microseconds. A lot of code that was
expecting no sub second time started breaking because of the extra
detail. The fix was 'CURRENT_TIME [(precision)]' but a compromise on
defaults results in CURRENT_TIMESTAMP != CURRENT_DATE + CURRENT_TIME
unless you actually set precision of both to match.
On PHP it was actually less of a problem because the data returned has
to be converted into a string and ibase.timestampformat filtered the
fractional part anyway, and even the seconds can be trimmed if
appropriate, so a 'default' string format would solve the problem of
comparing time data from different sources?
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk