ID: 36396 Updated by: [EMAIL PROTECTED] -Summary: strtotime() fails to parse dates in dd/mm/yyyy format Reported By: todd dot farrell at linkmarketservices dot com dot au -Status: Assigned +Status: Closed Bug Type: Date/time related Operating System: Win32 / Solaris 8 PHP Version: 5.1.2 Assigned To: derick New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Support for dd-mm-yyyy has been readded. Previous Comments: ------------------------------------------------------------------------ [2006-02-15 08:50:34] [EMAIL PROTECTED] 31/12/2005 is not supposed to work. It's not a valid format. However, I will see why 31-12-2005 doesn't work. ------------------------------------------------------------------------ [2006-02-15 02:54:13] todd dot farrell at linkmarketservices dot com dot au Description: ------------ Specifiying a date in the format 31/12/2005 fails to parse however the American format 12/31/2005 works. This works in PHP 5.0.4 on Solaris 8 but no longer works with the strtotime() changes in 5.1.2. Some more testing revealed that various formats do not work when the day precedes the month e.g. 31-12-2005 that used to work in 5.0.4. (We are aware that this does not necessarily produce sensible results e.g. strtotime("31/12/2005") != strtotime("12/31/2005") even in 5.0.4 although it seems that it should at least still *work* in the same way...) If you need any more information please let me know. Reproduce code: --------------- <?php print strtotime("31/12/2005"); ?> Expected result: ---------------- 1184162400 Actual result: -------------- nothing ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36396&edit=1
