|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-10-30 10:16 UTC] it at willowsv dot com
[2017-10-30 10:50 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2017-10-30 10:50 UTC] requinix@php.net
[2017-10-30 11:25 UTC] it at willowsv dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 19 13:00:01 2025 UTC |
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