Re: datetime status

From: Date: Mon, 21 Nov 2011 08:42:53 +0000
Subject: Re: datetime status
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-56451@lists.php.net to get a copy of this message
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

« previous php.internals (#56451) next »