#44188 [NEW]: strtotime and excepting dates...

From: Date: Wed, 20 Feb 2008 15:25:02 +0000
Subject: #44188 [NEW]: strtotime and excepting dates...
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-122509@lists.php.net to get a copy of this message
From: rgermain at efiretechnologies dot com Operating system: Linux/Windows PHP version: 5.2.5 PHP Bug Type: Date/time related Bug description: strtotime and excepting dates... Description: ------------ The strtotime() function doesn't except the date format mm-dd-yyyy. I does however except dd-mm-yyyy. This is in version 5.2.5. In version 4.4.4 it does except the format of mm-dd-yyyy. Reproduce code: --------------- <?php $one_day = 60 * 60 * 24; for($i=0; $i < 365; $i++) { $new_day = $one_day * $i; $new_date = time() + $new_day; $fdate = date("m-d-Y", $new_date); echo "<br>"; echo "Next day: " . $fdate . "<br>"; echo "StrtoTime: " . strtotime($fdate); echo "<br>"; } ?> Expected result: ---------------- All the days should output the correct date in the format of mm-dd-yyyy and the strtotime should all output. Actual result: -------------- strtotime stops outputting on the 13th day and starts again on the 1st of the following month. This tells me that it only excepts dd-mm-yyyy. -- Edit bug report at http://bugs.php.net/?id=44188&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44188&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44188&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44188&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44188&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44188&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44188&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44188&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44188&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44188&r=support Expected behavior: http://bugs.php.net/fix.php?id=44188&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44188&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44188&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44188&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44188&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44188&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44188&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44188&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44188&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44188&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44188&r=mysqlcfg

« previous php.bugs (#122509) next »