Bug #70086 [NEW]: DateTimeZone object doesn't calculate the offset correctly for some timezones

From: Date: Thu, 16 Jul 2015 08:57:49 +0000
Subject: Bug #70086 [NEW]: DateTimeZone object doesn't calculate the offset correctly for some timezones
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-194485@lists.php.net to get a copy of this message
From: tunderzone at gmail dot com Operating system: PHP version: 5.6.11 Package: Date/time related Bug Type: Bug Bug description:DateTimeZone object doesn't calculate the offset correctly for some timezones 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 bug report at https://bugs.php.net/bug.php?id=70086&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70086&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70086&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70086&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=70086&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=70086&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=70086&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=70086&r=needscript Try newer version: https://bugs.php.net/fix.php?id=70086&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=70086&r=support Expected behavior: https://bugs.php.net/fix.php?id=70086&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=70086&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=70086&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=70086&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70086&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=70086&r=dst IIS Stability: https://bugs.php.net/fix.php?id=70086&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=70086&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=70086&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=70086&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=70086&r=mysqlcfg

« previous php.bugs (#194485) next »