Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19212 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31485 invoked by uid 1010); 27 Sep 2005 17:44:02 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 31470 invoked from network); 27 Sep 2005 17:44:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Sep 2005 17:44:02 -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:33643] helo=jdi.jdi-ict.nl) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id DD/75-54476-0E489334 for ; Tue, 27 Sep 2005 13:44:01 -0400 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id j8RHhwlk014988; Tue, 27 Sep 2005 19:43:58 +0200 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id j8RHhpgj014972; Tue, 27 Sep 2005 19:43:52 +0200 Date: Tue, 27 Sep 2005 19:43:50 +0200 (CEST) X-X-Sender: derick@localhost To: Lester Caine cc: internals@lists.php.net In-Reply-To: <43397E48.7080107@lsces.co.uk> Message-ID: References: <43393A43.4070805@lsces.co.uk> <43397E48.7080107@lsces.co.uk> 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] timezones & date() breakage From: derick@php.net (Derick Rethans) On Tue, 27 Sep 2005, Lester Caine wrote: > Derick Rethans wrote: > > > >I'm coming in late here - but being in the middle of trying to configure a > > >system to provide calendars across time and daylight saving zones, I've > > >been deep in this! I have no problem with the time AT THE SERVER! What I > > >need to know is what daylight saving zone the client is in so I can build > > >the correct calendar for March/April or October/November. *ALL* the data on > > >the server is stored UTC so I could not care less which zone it is in :) > > >The ONLY solution I currently have is to get the client to set their > > >time/daylight zone in their profile on the server ? > > > > I've no clue what you mean here... sorry. Try to explain a bit better what > > you want to do. Do you want to render events' dates with the correct > > timezone while your data is in UTC (as Unix timestamp?)? > > Yes > Client currently supplies tz_offset, but that does not identify the daylight > saving offset so you can not show the correct shifts of calendar times for the > 'other' daylight offset :( So let him specify the area in which he is in, then you can use the correct timezone identifier for it. This is what the new code now allows you to do, which should make things much easier for you. I'll see if I can get the list of supported identifiers in the manual, as for PHP 5.1.0 the previously mentioned timezone_identifiers_list() is not enabled here yet. For information on how to use things, see this presentation: http://derickrethans.nl/files/time-ac2005.pdf > The FIRST problem I had was STOPPING the display from being offset by the > SERVER daylight saving setting! > There is absolutely no reason that date() should supply anything other than > the current UTC time. It is the only thing that is actually RIGHT! gmdate() is for that, date() should always show a local time. The new code (which is unfortunately not enabled), allows you do do all kinds of timezone manipulation. Feel free to test it by setting your CFLAGS to -DEXPERIMENTAL_DATE_SUPPORT and use the new functions following the examples from the presentation. regards, Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org