|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-10-31 10:31 UTC] derick@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: derick
[2016-10-31 10:44 UTC] derick@php.net
[2016-10-31 10:44 UTC] derick@php.net
-Status: Assigned
+Status: Closed
[2016-11-09 03:33 UTC] krakjoe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 06:00:01 2025 UTC |
Description: ------------ When you use the 'z' format character after the time ('H:i:s z'), the time information gets parsed incorrectly. If you use the 'z' char in front of the time ('z H:i:s'), it parses fine. Affected versions are 7.1.0RC4 and 7.1.0RC5: https://3v4l.org/QOS7s Test script: --------------- <?php $date = '12:00:00 15'; $format = 'H:i:s z'; var_dump(DateTime::createFromFormat($format, $date)); Expected result: ---------------- object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-16 12:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Actual result: -------------- object(DateTime)#1 (3) { ["date"]=> string(31) "2016-01-16 11:59:55.-2147483648" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }