Bug #75286 [Com]: \DateTime::format('v') returns 4 symbols instead of 3
| From: | ivan at podorozhny dot ru | Date: | Fri, 29 Sep 2017 15:08:44 +0000 |
| Subject: | Bug #75286 [Com]: \DateTime::format('v') returns 4 symbols instead of 3 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211457@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75286&edit=1
ID: 75286
Comment by: ivan at podorozhny dot ru
Reported by: ivan at podorozhny dot ru
Summary: \DateTime::format('v') returns 4 symbols instead of
3
Status: Duplicate
Type: Bug
Package: Date/time related
Operating System: ubuntu xenial
PHP Version: 7.1.10
Block user comment: N
Private report: N
New Comment:
If it's a duplicate, please give the original ticket number.
Previous Comments:
------------------------------------------------------------------------
[2017-09-29 15:04:11] requinix@php.net
Known issue - there are a couple other bugs somewhere around here dealing with microseconds rounding
improperly.
------------------------------------------------------------------------
[2017-09-29 14:59:29] ivan at podorozhny dot ru
Description:
------------
\DateTime::format('v') returns 4 symbols instead of 3
Test script:
---------------
$dateTime = new \DateTime('2017-09-29 17:44:48.999600');
var_dump($dateTime->format('Y-m-d H:i:s.v')); // '2017-09-29 17:44:48.1000'
instead of '2017-09-29 17:44:48.999' or even '2017-09-29 17:44:49.000'
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75286&edit=1