Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56451 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83097 invoked from network); 21 Nov 2011 08:42:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Nov 2011 08:42:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; 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:34431] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 76/61-06281-F0F0ACE4 for ; Mon, 21 Nov 2011 03:42:57 -0500 Received: from localhost (xdebug.org [127.0.0.1]) by xdebug.org (Postfix) with ESMTPS id 4D418DE13E; Mon, 21 Nov 2011 08:42:53 +0000 (GMT) Date: Mon, 21 Nov 2011 08:42:53 +0000 (GMT) X-X-Sender: derick@whisky To: Stas Malyshev cc: PHP Internals In-Reply-To: <4EC9AC3D.6090602@sugarcrm.com> Message-ID: References: <4EC9AC3D.6090602@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] datetime status From: derick@php.net (Derick Rethans) On Sun, 20 Nov 2011, Stas Malyshev wrote: > If it is the former, the patch seems to be pretty simple: > > --- lib/unixtime2tm.c (revision 319533) > +++ lib/unixtime2tm.c (working copy) > @@ -146,7 +146,7 @@ > 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; > @@ -184,7 +184,7 @@ > 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; That is incorrect, not every timezone DST change is 60 minutes. cheers, Derick