Re: Fix for php4 bug #30096

From: Date: Mon, 15 Nov 2004 16:54:38 +0000
Subject: Re: Fix for php4 bug #30096
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-13866@lists.php.net to get a copy of this message
On Mon, 15 Nov 2004, Vladimir Zidar wrote: > So the fix is easy: > > --- ext/standard/datetime.c.orig Fri Nov 12 22:35:04 2004 > +++ ext/standard/datetime.c Fri Nov 12 22:35:33 2004 > @@ -256,7 +256,7 @@ > gmadjust = -(is_dst ? timezone - 3600 : timezone); > #endif > #endif > - seconds += gmadjust; > + seconds -= gmadjust; > } > > RETURN_LONG(seconds); This fix is wrong, the example now returns definitely the wrong answer: derick@kossu:/dat/dev/php/php-5.0dev$ cat ext/standard/tests/time/bug30096.php <?php echo gmdate("H:i:s Y-m-d", gmmktime(02,00,01, 03,28,2004)); ?> derick@kossu:/dat/dev/php/php-5.0dev$ sapi/cli/php ext/standard/tests/time/bug30096.php 23:00:01 2004-03-27 This bug has nothing to do with the wrong direction of the adjustment, but more with the chancing to DST at that date. regards, Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org

« previous php.internals (#13866) next »