php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75286 \DateTime::format('v') returns 4 symbols instead of 3
Submitted: 2017-09-29 14:59 UTC Modified: 2017-09-29 15:11 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: ivan at podorozhny dot ru Assigned:
Status: Duplicate Package: Date/time related
PHP Version: 7.1.10 OS: ubuntu xenial
Private report: No CVE-ID: None
 [2017-09-29 14:59 UTC] 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'


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-29 15:04 UTC] requinix@php.net
-Status: Open +Status: Duplicate
 [2017-09-29 15:04 UTC] requinix@php.net
Known issue - there are a couple other bugs somewhere around here dealing with microseconds rounding improperly.
 [2017-09-29 15:08 UTC] ivan at podorozhny dot ru
If it's a duplicate, please give the original ticket number.
 [2017-09-29 15:11 UTC] salathe@php.net
Duplicate of #74753
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 12 11:01:28 2024 UTC