Req #52514 [Asn]: microseconds are missing in DateTime class
| From: | derick@php.net | Date: | Wed, 05 Oct 2016 20:03:25 +0000 |
| Subject: | Req #52514 [Asn]: microseconds are missing in DateTime class | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-204497@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=52514&edit=1
ID: 52514
Updated by: derick@php.net
Reported by: giorgio dot liscio at email dot it
Summary: microseconds are missing in DateTime class
Status: Assigned
Type: Feature/Change Request
Package: Date/time related
Operating System: all? xp x64
PHP Version: 5.3.3
Assigned To: derick
Block user comment: N
Private report: N
New Comment:
The issue from the title is fixed for PHP 7.1.0 RC4, but you can't use "ms" or the
like with DateTime->modify yet.
Previous Comments:
------------------------------------------------------------------------
[2010-08-07 02:45:51] giorgio dot liscio at email dot it
hi, thank you for accepting this bug
microseconds must be stored for example in:
"now"
"+5 weeks"
"-7 weekdays"
"ago"
in practice, when the date-time is relative to "now"
in plus must works (and apparently works) full microseconds support when datetime is instantiated
through createFromFormat()
see http://bugs.php.net/bug.php?id=52519 too
thank you for creating this library, love oop dates :)
------------------------------------------------------------------------
[2010-08-02 13:44:52] giorgio dot liscio at email dot it
Description:
------------
hi
i expected to dump microseconds too when i use
new DateTime("now");
new DateTime(date('Y-m-d H:i:s.283020,time()));
but apparently they are not stored at all in datetime objects
echo date('Y-m-d H:i:s.u',microtime(true));
or in classical php functions
thank you
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=52514&edit=1