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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ivan at podorozhny dot ru
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Tue Apr 16 15:01:29 2024 UTC