ID: 40340 Updated by: [EMAIL PROTECTED] Reported By: kal at kalunite dot net -Status: Open +Status: Assigned Bug Type: Date/time related Operating System: Linux PHP Version: 5.2.0 -Assigned To: +Assigned To: derick
Previous Comments: ------------------------------------------------------------------------ [2007-02-03 04:27:27] kal at kalunite dot net 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40340&edit=1