From: bens at benjamindsmith dot com Operating system: 2.4.x Linux, Windows PHP version: 4.3.2 PHP Bug Type: Documentation problem Bug description: strtotime can't handle dates before 1970, and the documentation doesn't say it.
Description: ------------ No matter what I do, strtotime can't seem to handle dates prior to 1970. The answer returned is always -1. The manual doesn't indicate this fact. Reproduce code: --------------- echo phpversion(); echo "\n------------------\n"; $time1="1/1/1970"; $time2="31-dec-1969"; $time3="31-dec-1949"; echo strtotime($time1); echo "\n"; echo strtotime($time2); echo "\n"; echo strtotime($time3); echo "\n"; Expected result: ---------------- 4.3.2 ----------------- 28800 -{some integer other than 1} -{some bigger integer other than 1} Actual result: -------------- 4.3.2 ------------------ 28800 -1 -1 -- Edit bug report at http://bugs.php.net/?id=25598&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25598&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25598&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25598&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25598&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25598&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25598&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25598&r=support Expected behavior: http://bugs.php.net/fix.php?id=25598&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25598&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25598&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25598&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25598&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25598&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25598&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25598&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=25598&r=float