Bug #75460 [Opn]: Incorrect Timezone Behaviour
| From: | it at willowsv dot com | Date: | Mon, 30 Oct 2017 10:16:14 +0000 |
| Subject: | Bug #75460 [Opn]: Incorrect Timezone Behaviour | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-212368@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75460&edit=1
ID: 75460
User updated by: it at willowsv dot com
Reported by: it at willowsv dot com
Summary: Incorrect Timezone Behaviour
Status: Open
Type: Bug
Package: Date/time related
Operating System: Windows 10 Apache 2.4
PHP Version: 7.1.11
Block user comment: N
Private report: N
New Comment:
October sorry :)
Previous Comments:
------------------------------------------------------------------------
[2017-10-30 10:15:07] it at willowsv dot com
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 this bug report at https://bugs.php.net/bug.php?id=75460&edit=1