Edit report at http://bugs.php.net/bug.php?id=53299&edit=1
ID: 53299 Updated by: [email protected] Reported by: d dot reade at ReadesGroupServices dot com Summary: strtotime expects date format to be MM/DD/YYYY even though timezone set to GMT -Status: Open +Status: Bogus Type: Bug Package: Date/time related Operating System: CentOS 5.5 PHP Version: 5.3.3 Block user comment: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Timezones don't affect parsing formats. The formats used for parsing are always the same. You want to have a look at: http://uk.php.net/manual/en/datetime.createfromformat.php Previous Comments: ------------------------------------------------------------------------ [2010-11-12 14:02:31] d dot reade at ReadesGroupServices dot com Description: ------------ Using strtotime() to convert a UK date stamp (DD/MM/YYYY) but getting null or incorrect date. Test script: --------------- <? ini_set('date.timezone', 'Europe/London'); $time = strtotime('31/08/2010'); $date = date('jS M Y', $time); echo $date; ?> Expected result: ---------------- 31st Aug 2010 Actual result: -------------- 1st Jan 1970 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53299&edit=1
