From: Operating system: Linux PHP version: 5.2.13 Package: Date/time related Bug Type: Bug Bug description:timelib_timezone_lookup has invalid DST entries, breaks strtotime
Description: ------------ It seems timezonemap.h was generated by a tzdata parser that unfortunately did not include information on the years Daylight Saving Time was in use. In particular, in South Korea, there is no DST, yet there exists KST/KDT distinction in strtotime that thinks KDT is currently active, with inconsistencies with other date/time functions. Test script: --------------- <?php function tzconvert ($input, $timezone) { $ts = strtotime ($input); $time = gmdate ('r', $ts); $dt = new DateTime ($time); $dt->setTimeZone (new DateTimeZone ($timezone)); echo "Input: $time\nConverted: " . $dt->format ('l, M d g:ia T') . "\n"; } tzconvert ("Thursday, April 15 2010 12:00am EDT", "KST"); tzconvert ("Thursday, April 15 2010 12:00am EDT", "KDT"); tzconvert ("Thursday, Apr 15 1:00pm KST", "EDT"); tzconvert ("Thursday, Apr 15 1:00pm KDT", "EDT"); ?> Expected result: ---------------- Input: Thu, 15 Apr 2010 04:00:00 +0000 Converted: Thursday, Apr 15 1:00pm KST Input: Thu, 15 Apr 2010 04:00:00 +0000 Converted: Thursday, Apr 15 1:00pm KST Input: Thu, 15 Apr 2010 05:00:00 +0000 Converted: Thursday, Apr 15 1:00am EDT Input: Thu, 15 Apr 2010 04:00:00 +0000 Converted: Thursday, Apr 15 12:00am EDT Actual result: -------------- Input: Thu, 15 Apr 2010 04:00:00 +0000 Converted: Thursday, Apr 15 1:00pm KST Input: Thu, 15 Apr 2010 04:00:00 +0000 Converted: Thursday, Apr 15 1:00pm KST Input: Thu, 15 Apr 2010 05:00:00 +0000 Converted: Thursday, Apr 15 1:00am EDT Input: Thu, 15 Apr 2010 04:00:00 +0000 Converted: Thursday, Apr 15 1:00am EDT -- Edit bug report at http://bugs.php.net/bug.php?id=51557&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51557&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51557&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51557&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51557&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51557&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51557&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51557&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51557&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51557&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51557&r=support Expected behavior: http://bugs.php.net/fix.php?id=51557&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51557&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51557&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51557&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51557&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51557&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51557&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51557&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51557&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51557&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51557&r=mysqlcfg