From: soapergem at gmail dot com Operating system: Windows PHP version: 5.3.0 PHP Bug Type: Date/time related Bug description: Middle Endian date format only semi-recognized by strtotime
Description: ------------ An extremely common date format in the USA is middle endian, which is often expressed in one of two ways. Today's date (July 21, 2009) could be expressed as either of the following: 1. 07/21/2009 2. 07-21-2009 Currently, if the first version (1) is passed into strtotime(), it successfully parses the date. However, the second version (2) returns FALSE. Reproduce code: --------------- <?php var_dump(strtotime('07/21/2009')); // good var_dump(strtotime('07-21-2009')); // bad ?> Expected result: ---------------- int(1248152400) int(1248152400) Actual result: -------------- int(1248152400) bool(false) -- Edit bug report at http://bugs.php.net/?id=49011&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49011&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49011&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49011&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49011&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49011&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49011&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49011&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49011&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49011&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49011&r=support Expected behavior: http://bugs.php.net/fix.php?id=49011&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49011&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49011&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49011&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49011&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49011&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49011&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49011&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49011&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49011&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49011&r=mysqlcfg