From: kris dot craig at gmail dot com Operating system: Windows PHP version: 5.2.6 PHP Bug Type: Scripting Engine problem Bug description: Function strtotime() always returns FALSE if year > 2037!!
Description: ------------ Any time I enter a date (any format) into strtotime that contains a year later than 2037, the function returns FALSE every time. If I change the year to 2037 or earler, without changing anything else, it works every time. I have not been able to find any documentation or other information to explain this phenomenon. Pertinent server/module/etc information can be found here: http://www.kriscraig.com/phpinfo.php Reproduce code: --------------- /* This could not be simpler.... */ print strtotime( "2012-05-06" ); //1336287600 (works) print strtotime( "12 May 2037" ); //2125724400 (works) print strtotime( "12 May 2038" ); // (doesn't work!) print strtotime( "2500-05-06" ); // (doesn't work!) Expected result: ---------------- They should all return a valid timestamp. FALSE should only be returned if it fails, which is not supposed to happen simply because the year being input is greater than 2037! Actual result: -------------- It returns FALSE. Nothing. Nada. -- Edit bug report at http://bugs.php.net/?id=45713&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45713&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45713&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45713&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45713&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45713&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45713&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45713&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45713&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45713&r=support Expected behavior: http://bugs.php.net/fix.php?id=45713&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45713&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45713&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45713&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45713&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45713&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45713&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45713&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45713&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45713&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45713&r=mysqlcfg