php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62546 Invalid microtime parsing
Submitted: 2012-07-13 10:32 UTC Modified: 2012-07-20 02:34 UTC
Votes:4
Avg. Score:4.5 ± 0.9
Reproduced:4 of 4 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: mingalevme at gmail dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.4.4 OS: Ubuntu 12.04
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mingalevme at gmail dot com
New email:
PHP Version: OS:

 

 [2012-07-13 10:32 UTC] mingalevme at gmail dot com
Description:
------------
See sample below

Test script:
---------------
$date = new Datetime('2012-07-11 18:46:07.517569');
echo $date->format('u');

Expected result:
----------------
517569

Actual result:
--------------
517568

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-07-20 02:34 UTC] aharvey@php.net
-Status: Open +Status: Not a bug
 [2012-07-20 02:34 UTC] aharvey@php.net
The fractional component is stored internally as a floating-point value, and is hence subject to the usual imprecision associated with floats.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 02:01:38 2025 UTC