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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to