Bug #76530 [Opn->Dup]: Timezone is incorrectly applied when converting dates beyond 2037
| From: | requinix@php.net | Date: | Tue, 26 Jun 2018 04:03:35 +0000 |
| Subject: | Bug #76530 [Opn->Dup]: Timezone is incorrectly applied when converting dates beyond 2037 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215975@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76530&edit=1
ID: 76530
Updated by: requinix@php.net
Reported by: mlambley at gmail dot com
Summary: Timezone is incorrectly applied when converting
dates beyond 2037
-Status: Open
+Status: Duplicate
Type: Bug
Package: Scripting Engine problem
Operating System: Windows 10, FreeBSD, others
PHP Version: 7.2.7
Block user comment: N
Private report: N
New Comment:
Duplicate of bug #64992
Previous Comments:
------------------------------------------------------------------------
[2018-06-26 03:52:12] mlambley at gmail dot com
Description:
------------
Right now, it is not daylight savings in Adelaide, Australia. Converting a \DateTime object with
2037-10-04 or earlier into ISO 8601 (format 'c') correctly makes the time zone +09:30
However, any date beyond this will incorrectly add the daylight savings to the time zone +10:30
Please note that this issue may be time sensitive. If you're executing the code during the
Australian summer you may not be able to reproduce the results.
Confirmed not working on a freshly downloaded, unmodified version of PHP v7.2.7
Test script:
---------------
<?php
date_default_timezone_set('Australia/Adelaide');
$date1 = new DateTime('2037-10-05');
var_dump($date1->format('c'));
$date2 = new DateTime('2037-10-04');
var_dump($date2->format('c'));
Expected result:
----------------
string(25) "2037-10-05T00:00:00+09:30"
string(25) "2037-10-04T00:00:00+09:30"
Actual result:
--------------
string(25) "2037-10-05T00:00:00+10:30"
string(25) "2037-10-04T00:00:00+09:30"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76530&edit=1