|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-12-28 23:02 UTC] daverandom@php.net
-PHP Version: 7.1.12
+PHP Version: >=7.1.0
[2020-04-11 15:22 UTC] cmb@php.net
[2022-06-08 14:59 UTC] git@php.net
[2022-06-08 14:59 UTC] git@php.net
-Status: Open
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 18:00:01 2025 UTC |
Description: ------------ The "u" specifier is documented as "microseconds" but is interpreted as "fraction of a second". While this is not the correct behaviour, it is potentially a desirable behaviour, specifically one might expect to be able to interpret a date like `12:13:14.42` as having a fractional part. I propose adding an "f" specifier (currently unused) which retains this old behaviour, and fixing "u" to work as documented. Test script: --------------- echo DateTime::createFromFormat('u', '42')->format('u'); Expected result: ---------------- 000042 Actual result: -------------- 420000