Bug #74258 [Com]: Microseconds are missing in DateTime class
| From: | malte dot blaettermann at gmail dot com | Date: | Sat, 18 Mar 2017 06:40:11 +0000 |
| Subject: | Bug #74258 [Com]: Microseconds are missing in DateTime class | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-207922@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74258&edit=1
ID: 74258
Comment by: malte dot blaettermann at gmail dot com
Reported by: dawid dot lakomski at gmail dot com
Summary: Microseconds are missing in DateTime class
Status: Open
Type: Bug
Package: Date/time related
Operating System: Ubuntu 16.04
PHP Version: 7.1.3
Block user comment: N
Private report: N
New Comment:
Maybe this commit has introduced the bug?
https://github.com/php/php-src/commit/5113909259f897c9c69f23cf5f8f7ab8972d5eba
Previous Comments:
------------------------------------------------------------------------
[2017-03-17 07:35:44] dawid dot lakomski at gmail dot com
Description:
------------
After upgrading to PHP 7.1.3 I noticed that microseconds are now missing from DateTime objects.
Test script:
---------------
<?php
var_dump(new \DateTime());
Expected result:
----------------
Microseconds part of $date field should not be 000000 (or not always ;) )
Actual result:
--------------
class DateTime#1 (3) {
public $date =>
string(26) "2017-03-17 08:25:48.000000"
public $timezone_type =>
int(3)
public $timezone =>
string(13) "Europe/Berlin"
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74258&edit=1