timestamp).
- Fixed bug #55253 (DateTime::add() and sub() result -1 hour on objects with
time zone type 2).
And fixed some test cases.
int z = tm->z;
signed int dst = tm->dst;
- timelib_unixtime2gmt(tm, tm->sse - (tm->z * 60));
+ timelib_unixtime2gmt(tm, tm->sse - (tm->z * 60) + (tm->dst * 3600));
tm->z = z;
tm->dst = dst;
int z = tm->z;
signed int dst = tm->dst;
- timelib_unixtime2gmt(tm, ts - (tm->z * 60));
+ timelib_unixtime2gmt(tm, ts - (tm->z * 60) + (tm->dst * 3600));
tm->z = z;
tm->dst = dst;
--TEST--
-DateTime::add() and sub() result -1 hour on objects with time zone type 2
+Bug #55253: DateTime::add() and sub() result -1 hour on objects with time zone type 2
--CREDITS--
Daniel Convissor <danielc@php.net>
---XFAIL--
-Bug 55253 exists
--FILE--
<?php
--- /dev/null
+--TEST--
+Bug #60236: TLA timezone dates are not converted properly from timestamp
+--FILE--
+<?php
+$t = new DateTime('2010-07-06 18:38:28 EDT');
+$ts = $t->format('U');
+var_dump($ts);
+$t->setTimestamp($ts);
+var_dump($t);
+?>
+--EXPECT--
+string(10) "1278455908"
+object(DateTime)#1 (3) {
+ ["date"]=>
+ string(19) "2010-07-06 18:38:28"
+ ["timezone_type"]=>
+ int(2)
+ ["timezone"]=>
+ string(3) "EDT"
+}
RFC: DateTime and Daylight Saving Time Transitions (zone type 2)
--CREDITS--
Daniel Convissor <danielc@php.net>
---XFAIL--
-RFC not implemented yet
--FILE--
<?php