Bug #70086 [Opn->Dup]: DateTimeZone object doesn't calculate the offset correctly for some timezones
| From: | cmb@php.net | Date: | Thu, 16 Jul 2015 11:00:36 +0000 |
| Subject: | Bug #70086 [Opn->Dup]: DateTimeZone object doesn't calculate the offset correctly for some timezones | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-194487@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70086&edit=1
ID: 70086
Updated by: cmb@php.net
Reported by: tunderzone at gmail dot com
Summary: DateTimeZone object doesn't calculate the offset
correctly for some timezones
-Status: Open
+Status: Duplicate
Type: Bug
Package: Date/time related
PHP Version: 5.6.11
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Duplicate of bug #69916.
Previous Comments:
------------------------------------------------------------------------
[2015-07-16 08:57:48] tunderzone at gmail dot com
Description:
------------
DateTimeZone object doesn't calculate the offset correctly.
php > echo phpversion();
5.6.11
php > $timezone = new DateTimeZone('EEST');
php > $date = new DateTime('2015-07-16', new
DateTimeZone('Europe/Bucharest'));
php > echo $date->format('T P');
EEST +03:00
php > $date->setTimezone($timezone);
php > echo $date->format('T P');
EEST +02:00
Test script:
---------------
<?php
$timezone = new DateTimeZone('EEST');
$date = new DateTime('2015-07-16', new DateTimeZone('Europe/Bucharest'));
$date->setTimezone($timezone);
echo $date->format('T P');
Expected result:
----------------
EEST +03:00
Actual result:
--------------
EEST +02:00
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70086&edit=1