From: kal at kalunite dot net
Operating system: Linux
PHP version: 5.2.0
PHP Bug Type: Date/time related
Bug description: Creating a DateTime object using a string that is invalid due
to DST transition
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 bug report at http://bugs.php.net/?id=40340&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=40340&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=40340&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=40340&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40340&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=40340&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40340&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40340&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40340&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40340&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40340&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=40340&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=40340&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40340&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40340&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40340&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40340&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40340&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40340&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40340&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40340&r=mysqlcfg