|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-11-07 18:11 UTC] stas@php.net
-Assigned To:
+Assigned To: derick
[2011-11-21 02:18 UTC] danielc@php.net
[2011-11-24 17:13 UTC] derick@php.net
[2011-11-24 17:14 UTC] derick@php.net
-Status: Assigned
+Status: Closed
[2011-11-24 17:14 UTC] derick@php.net
[2012-04-18 09:47 UTC] laruence@php.net
[2012-07-24 23:38 UTC] rasmus@php.net
[2013-11-17 09:35 UTC] laruence@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 19:00:01 2025 UTC |
Description: ------------ If you convert a date with TLA timezone (like EDT) to timestamp, and then convert it back from timestamp, resulting date is off by an hour. See example below. Test script: --------------- <?php $t = new DateTime('2010-07-06 18:38:28 EDT'); $ts = $t->format('U'); var_dump($ts); $t->setTimestamp($ts); var_dump($t); Expected result: ---------------- string(10) "1278455908" object(DateTime)#1 (3) { ["date"]=> string(19) "2010-07-06 18:38:28" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EDT" } Actual result: -------------- string(10) "1278455908" object(DateTime)#1 (3) { ["date"]=> string(19) "2010-07-06 17:38:28" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EDT" }