Bug #52152 [Opn->Wfx]: DST detection works wrong with late dates (TS over int32)
| From: | heiglandreas@php.net | Date: | Wed, 11 Jan 2017 08:31:29 +0000 |
| Subject: | Bug #52152 [Opn->Wfx]: DST detection works wrong with late dates (TS over int32) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206507@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=52152&edit=1
ID: 52152
Updated by: heiglandreas@php.net
Reported by: danikas2k2 at gmail dot com
Summary: DST detection works wrong with late dates (TS over
int32)
-Status: Open
+Status: Wont fix
Type: Bug
Package: Date/time related
Operating System: Ubuntu i686 2.6.32-22-generic
PHP Version: 5.3.2
Block user comment: N
Private report: N
New Comment:
DST information is provided by IANAs timezonedb. That DB is considered accurate only with in half a
year.
No one knows whether a certain area still has DST within the next 10 years, So requesting that
information 40 years in advance needs to result in a wrong information. You can NOT relly on that as
it is subject to change on short notice.
Depending on your use-case you should consider a different approach.
Previous Comments:
------------------------------------------------------------------------
[2010-06-23 07:29:56] danikas2k2 at gmail dot com
Description:
------------
DST detection for late dates (timestamp over int32)
Test script:
---------------
$date = new DateTime('2020-05-25 12:00:00', new DateTimeZone('Europe/Warsaw'));
echo $date->format(DateTime::ATOM), ' ', $date->format('I U');
$date = new DateTime('2050-05-25 12:00:00', new DateTimeZone('Europe/Warsaw'));
echo $date->format(DateTime::ATOM), ' ', $date->format('I U');
Expected result:
----------------
2020-05-25T12:00:00+02:00 1 1590400800
2050-05-25T12:00:00+02:00 1 2537089200
Actual result:
--------------
2020-05-25T12:00:00+02:00 1 1590400800
2050-05-25T12:00:00+01:00 0 2537089200
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=52152&edit=1