Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19553 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49436 invoked by uid 1010); 10 Oct 2005 16:44:12 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 49421 invoked from network); 10 Oct 2005 16:44:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Oct 2005 16:44:12 -0000 X-Host-Fingerprint: 82.94.239.5 jdi.jdi-ict.nl Linux 2.5 (sometimes 2.4) (4) Received: from ([82.94.239.5:40497] helo=jdi.jdi-ict.nl) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 84/5B-54476-65A9A434 for ; Mon, 10 Oct 2005 12:44:06 -0400 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id j9AGi3gB021600; Mon, 10 Oct 2005 18:44:03 +0200 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id j9AGi0oU021589; Mon, 10 Oct 2005 18:44:01 +0200 Date: Mon, 10 Oct 2005 18:43:58 +0200 (CEST) X-X-Sender: derick@localhost To: Nuno Lopes cc: Stanislav Malyshev , PHP Development In-Reply-To: <001301c5ccdd$77f6d130$0100a8c0@pc07653> Message-ID: References: <001301c5ccdd$77f6d130$0100a8c0@pc07653> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at jdi-ict.nl Subject: Re: [PHP-DEV] date() status From: derick@php.net (Derick Rethans) On Sun, 9 Oct 2005, Nuno Lopes wrote: > > I'm not sure if all the patches are commited as for now, but it still > > doesn't work for me. First, IDT setting still returns unknown timezone, > > second, now PHP crashes in: > > > > 0x08095bcd in timelib_tzinfo_dtor (tz=0x0) at > > php5/ext/date/lib/timelib.c:107 > > 107 TIMELIB_TIME_FREE(tz->name); > > (gdb) bt > > #0 0x08095bcd in timelib_tzinfo_dtor (tz=0x0) at > > php5/ext/date/lib/timelib.c:107 > > #1 0x08076f31 in _php_date_tzinfo_dtor (tzinfo=0xa3252a0) at > > php5/ext/date/php_date.c > > > > if I set 'IDT' timezone. Same if I set 'IST' timezone. > > This patch should fix the segfault: > http://mega.ist.utl.pt/~ncpl/php_date_segf.txt I fixed it in a slightly different way. It's fine to cache missed lookups, but we shouldn't try to dtor those then. > The problem of not recognising your timezones is because currently the > code isn't doing any guessing magic (aka guess full name from abbr) > when the TZ environment var is set. Perhaps a > timelib_timezone_id_from_abbr() call could be added in the 'if (env && > *env)' section. No, setting a timezone through a TZ environment variable to an abbreviation is not a good idea. Either set your system's timezone correctly or use a full identifier in the TZ environment variable. Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org