From: jon dot reed at jellyfish dot co dot uk
Operating system: Centos 5.1
PHP version: 5.2.6
PHP Bug Type: Date/time related
Bug description: strtotime() returning 1999-11-30 for 00-00-00 00:00:00
Description:
------------
As per bug #41523 which is reported fixed on Vista.
We're running a custom build RPM of 5.2.6
It looks like this bug has reappeared:
$incorrect = '1999-11-30';
$time = date('Y-m-d',strtotime('00-00-00 00:00:00'));
$this->assertNotEqual($time, $incorrect);
This fails SimpleTest.
php -r "echo date('Y-m-d',strtotime('00-00-00 00:00:00'));"
1999-11-30
Reproduce code:
---------------
echo strtotime('00-00-00 00:00:00');
Expected result:
----------------
-1
Actual result:
--------------
943920000
--
Edit bug report at http://bugs.php.net/?id=45647&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=45647&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=45647&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=45647&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45647&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=45647&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45647&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45647&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45647&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45647&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45647&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=45647&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=45647&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45647&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45647&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45647&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45647&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45647&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45647&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45647&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45647&r=mysqlcfg