Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53369 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64736 invoked from network); 18 Jun 2011 09:41:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jun 2011 09:41:26 -0000 Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:45059] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/C0-60007-4C27CFD4 for ; Sat, 18 Jun 2011 05:41:25 -0400 Received: from localhost (xdebug.org [127.0.0.1]) by xdebug.org (Postfix) with ESMTPS id 6B6ABDE13E; Sat, 18 Jun 2011 10:41:21 +0100 (BST) Date: Sat, 18 Jun 2011 10:41:20 +0100 (BST) X-X-Sender: derick@whisky To: Stas Malyshev cc: Hannes Magnusson , PHP Internals In-Reply-To: <4DFBA5BC.3060707@sugarcrm.com> Message-ID: References: <4DFA96ED.90800@sugarcrm.com> <4DFB6C69.4040702@sugarcrm.com> <4DFBA5BC.3060707@sugarcrm.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] date_diff broken? From: derick@php.net (Derick Rethans) On Fri, 17 Jun 2011, Stas Malyshev wrote: > Hi! > > > Does it mean that all the tests Daniel added should work now? > > http://news.php.net/php.cvs/65174 > > Looks like ts->date conversion is broken on TLA timezones. Try: > > $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... Yes, I know. It's probably because of the "dst" flag. I did see that yesterday, but didn't have the time to fix it yet, or look at it. cheers, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug