|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #52519 microseconds in DateInterval are missing
Submitted: 2010-08-02 23:06 UTC Modified: 2016-10-05 20:59 UTC
Avg. Score:4.3 ± 0.8
Reproduced:15 of 15 (100.0%)
Same Version:3 (20.0%)
Same OS:1 (6.7%)
From: giorgio dot liscio at email dot it Assigned: derick (profile)
Status: Closed Package: Date/time related
PHP Version: 5.3.3 OS: xp x64 all
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.
Block user comment
Status: Assign to:
Bug Type:
From: giorgio dot liscio at email dot it
New email:
PHP Version: OS:


 [2010-08-02 23:06 UTC] giorgio dot liscio at email dot it
hi, the property $seconds should be float or a $microseconds property is missing in the class DateInterval

thank you


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-07 00:38 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: derick
 [2010-08-07 02:51 UTC] giorgio dot liscio at email dot it
hi thank you for accepting this bug

since ISO8601 does not specify how to treat microseconds

i think the best way to implement this is with seconds treated as floats


see too

again, thank you for this library and for your attention on my requests

 [2010-08-07 02:52 UTC] giorgio dot liscio at email dot it
sorry, bad link
 [2010-08-30 17:52 UTC]
ISO 8601 actually allows fractions for seconds (see section
 [2011-01-22 08:51 UTC]
-Type: Bug +Type: Feature/Change Request
 [2016-10-05 20:04 UTC]
For var_dump(), the microseconds are now there - and also used when doing diff() or add().
 [2016-10-05 20:59 UTC]
-Status: Assigned +Status: Closed
 [2016-10-05 20:59 UTC]
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

As ISO 8601 does not support fractions for seconds for intervals, this will not be implemented.

The original property for DateInterval's microseconds ("f") has been added for PHP 7.1.0RC4.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jun 13 06:01:32 2024 UTC