|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-11-02 12:40 UTC] jani@php.net
[2008-11-10 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 00:00:02 2025 UTC |
Description: ------------ You can create an invalid DateTime object by giving it a string in the GNU Date Input Format syntax. For instance, '2006-04-02 02:05:00 America/New_York' is supposed to be invalid because DST takes effect on that day, such that all times >= 02:00:00 and < 03:00:00 are supposed to be invalid. Trying to create a DateTime object with that string is supposed to return FALSE. The bug is probably not caused by an outdated timezone database because the timezone database in use is version 2006.14. I could not test for the bug in the latest snapshot because the latest snapshot crashes Apache2 on my machine( and that's a different story). Reproduce code: --------------- <? $foo = date_create('2006-04-02 02:05:00 America/New_York'); if($foo) { echo $foo->format('Y-m-d H:i:s e'),$foo->format('I')?' DST':''; } else { echo "FALSE"; } ?> Expected result: ---------------- FALSE Actual result: -------------- 2006-04-02 02:05:00 America/New_York DST