#31661 [NEW]: strtotime does not parse dates before 1-1-1970

From: Date: Sun, 23 Jan 2005 06:07:13 +0000
Subject: #31661 [NEW]: strtotime does not parse dates before 1-1-1970
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-72686@lists.php.net to get a copy of this message
From: gregorylee at contractweb dot net Operating system: WinXP PHP version: 4.3.8 PHP Bug Type: Date/time related Bug description: strtotime does not parse dates before 1-1-1970 Description: ------------ strtotime still fails (as of version 4.3.8) to appropriately parse dates prior to 1-1-1970 in Windows builds. Reproducable with dates in various formats: MM/DD/YYYY, DD/MM/YYYY, YYYY-MM-DD. Validation/conversion of dates prior to 1970 are frequently needed for applications that accept user input for birthdates. Reproduce code: --------------- print strtotime('04/28/1964'); print strtotime('4/28/64'); print strtotime('1964-04-28'); print strtotime('28/4/1964'); Expected result: ---------------- expect timestamps with the appropriate value (instead of -1); Actual result: -------------- -1 -1 -1 -1 -- Edit bug report at http://bugs.php.net/?id=31661&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31661&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31661&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31661&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31661&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31661&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31661&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31661&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31661&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31661&r=support Expected behavior: http://bugs.php.net/fix.php?id=31661&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31661&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31661&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31661&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31661&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31661&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31661&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31661&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31661&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31661&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31661&r=mysqlcfg

« previous php.bugs (#72686) next »