|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-11-04 11:57 UTC] cmb@php.net
-Status: Open
+Status: Verified
[2019-11-04 11:57 UTC] cmb@php.net
[2020-01-20 17:11 UTC] girgias@php.net
-Assigned To:
+Assigned To: derick
[2021-04-06 19:18 UTC] derick@php.net
-Status: Verified
+Status: Not a bug
[2021-04-06 19:18 UTC] derick@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 02:00:02 2025 UTC |
Description: ------------ I would expect that the factory method createFromFormat should work like the constructor parameter. Test script: --------------- $date = new DateTimeImmutable('2019-11-01T12:12:40.8859136+00:00'); var_dump($date); $date = DateTimeImmutable::createFromFormat(DateTimeInterface::RFC3339_EXTENDED, '2019-11-01T12:12:40.8859136+00:00'); var_dump($date); Expected result: ---------------- object(DateTimeImmutable) { ["date"]=> string(26) "2019-11-01 12:12:40.885913" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+00:00" } object(DateTimeImmutable) { ["date"]=> string(26) "2019-11-01 12:12:40.885913" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+00:00" } Actual result: -------------- object(DateTimeImmutable) { ["date"]=> string(26) "2019-11-01 12:12:40.885913" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+00:00" } bool(false)