Re: date_diff broken?
| From: | Stas Malyshev | Date: | Fri, 17 Jun 2011 19:06:36 +0000 |
| Subject: | Re: date_diff broken? | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-53363@lists.php.net to get a copy of this message | ||
Hi!
Does it mean that all the tests Daniel added should work now? http://news.php.net/php.cvs/65174Looks like ts->date conversion is broken on TLA timezones. Try: <?php $t = new DateTime('2010-11-06 18:38:28 EDT'); // prev, zt2 $ts = $t->format('U'); var_dump($ts); $t->setTimestamp($ts); var_dump($t); That produces: object(DateTime)#1 (3) { ["date"]=> string(19) "2010-11-06 17:38:28" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EDT" } Which obviously is not what it should be. Looks like timelib_unixtime2gmt() or timelib_update_from_sse() has some bug that breaks it... -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227