Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13866 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69645 invoked by uid 1010); 15 Nov 2004 16:54:40 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 69588 invoked from network); 15 Nov 2004 16:54:39 -0000 Received: from unknown (HELO jdi.jdimedia.nl) (212.204.192.51) by pb1.pair.com with SMTP; 15 Nov 2004 16:54:39 -0000 Received: from localhost (localhost [127.0.0.1]) by jdi.jdimedia.nl (8.12.11/8.12.11) with ESMTP id iAFGsdJx000863 for ; Mon, 15 Nov 2004 17:54:39 +0100 Received: from localhost (localhost [127.0.0.1]) by jdi.jdimedia.nl (8.12.11/8.12.11) with ESMTP id iAFGscqc000854; Mon, 15 Nov 2004 17:54:38 +0100 Date: Mon, 15 Nov 2004 17:54:38 +0100 (CET) X-X-Sender: derick@localhost To: Vladimir Zidar cc: internals@lists.php.net In-Reply-To: <1100531086.4084.9.camel@mravojed> Message-ID: References: <1100531086.4084.9.camel@mravojed> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at jdimedia.nl Subject: Re: [PHP-DEV] Fix for php4 bug #30096 From: derick@php.net (Derick Rethans) 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 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