|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-07-16 11:00 UTC] cmb@php.net
-Status: Open
+Status: Duplicate
-Assigned To:
+Assigned To: cmb
[2015-07-16 11:00 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 00:00:02 2025 UTC |
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