From: phpbugs at enduringresults dot com Operating system: Fedora Core 9 PHP version: 5.2.6 PHP Bug Type: Date/time related Bug description: Daylight Savings doesn't work with the UTC time zone
Description: ------------ Daylight Savings doesn't work with the UTC time zone It does work if I set the time zone to Europe/London. Reproduce code: --------------- <?php echo date_default_timezone_get() . "\n"; $two_weeks_ago = date("d-M-Y h:i:s T I", time()-1209600); echo $tw?php echo date_default_timezone_get() . "\n"; $two_weeks_ago = date("d-M-Y h:i:s T I", time()-1209600); echo $two_weeks_ago . "\n"; $right_now = date("d-M-Y h:i:s T I", time()); echo $right_now . "\n\n"; date_default_timezone_set("Europe/London"); echo date_default_timezone_get() . "\n"; $two_weeks_ago = date("d-M-Y h:i:s T I", time()-1209600); echo $two_weeks_ago . "\n"; $right_now = date("d-M-Y h:i:o_weeks_ago . "\n"; $right_now = date("d-M-Y h:i:s T I", time()); echo $right_now . "\n\n"; date_default_timezone_set("Europe/London"); echo date_default_timezone_get() . "\n"; $two_weeks_ago = date("d-M-Y h:i:s T I", time()-1209600); echo $two_weeks_ago . "\n"; $right_now = date("d-M-Y h:i:s T I", time()); echo $right_now . "\n\n"; date_default_timezone_set("UTC"); echo date_default_timezone_get() . "\n"; $two_weeks_ago = date("d-M-Y h:i:s T I", time()-1209600); echo $two_weeks_ago . "\n"; $right_now = date("d-M-Y h:i:s T I", time()); echo $right_now . "\n"; ?> Expected result: ---------------- UTC 18-Oct-2008 10:17:25 UTC 1 01-Nov-2008 09:17:25 UTC 0 Europe/London 18-Oct-2008 10:17:25 BST 1 01-Nov-2008 09:17:25 GMT 0 UTC 18-Oct-2008 10:17:25 UTC 1 01-Nov-2008 09:17:25 UTC 0 Actual result: -------------- UTC 18-Oct-2008 09:17:25 UTC 0 01-Nov-2008 09:17:25 UTC 0 Europe/London 18-Oct-2008 10:17:25 BST 1 01-Nov-2008 09:17:25 GMT 0 UTC 18-Oct-2008 09:17:25 UTC 0 01-Nov-2008 09:17:25 UTC 0 -- Edit bug report at http://bugs.php.net/?id=46459&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46459&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46459&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46459&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46459&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46459&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46459&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46459&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46459&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46459&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46459&r=support Expected behavior: http://bugs.php.net/fix.php?id=46459&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46459&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46459&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46459&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46459&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46459&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46459&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46459&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46459&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46459&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46459&r=mysqlcfg