Bug #75460 [NEW]: Incorrect Timezone Behaviour

From: Date: Mon, 30 Oct 2017 10:15:17 +0000
Subject: Bug #75460 [NEW]: Incorrect Timezone Behaviour
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-212367@lists.php.net to get a copy of this message
From: it at willowsv dot com Operating system: Windows 10 Apache 2.4 PHP version: 7.1.11 Package: Date/time related Bug Type: Bug Bug description:Incorrect Timezone Behaviour Description: ------------ This may be intended behaviour however the clocks went back on the 29th of November and all date related functions are returning the times minus 1 hour for the entire day (despite the timezone being UTC) Test script: --------------- <?php date_default_timezone_set( 'Europe/London' ); $tTime = strtotime("MIDNIGHT"); echo("Europe/London - " . time() . " - " . gmdate("d/m/Y H:i:s e", $tTime) . "<br />"); date_default_timezone_set( 'UTC' ); $tTime = strtotime("MIDNIGHT"); echo("UTC - " . time() . " - " . gmdate("d/m/Y H:i:s e", $tTime) . "<br />"); ?> Expected result: ---------------- Europe/London - 1509356919 - 30/10/2017 00:00:00 UTC UTC - 1509356919 - 30/10/2017 00:00:00 UTC In Both timezones settings. Actual result: -------------- 30th November Europe/London - 1509356919 - 30/10/2017 00:00:00 UTC UTC - 1509356919 - 30/10/2017 00:00:00 UTC 29th November Europe/London - 1509271023 - 28/10/2017 23:00:00 UTC UTC - 1509271023 - 29/10/2017 00:00:00 UTC -- Edit bug report at https://bugs.php.net/bug.php?id=75460&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75460&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75460&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75460&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75460&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75460&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75460&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75460&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75460&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75460&r=support Expected behavior: https://bugs.php.net/fix.php?id=75460&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75460&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75460&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75460&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75460&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75460&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75460&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75460&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75460&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75460&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75460&r=mysqlcfg

« previous php.bugs (#212367) next »