[Seaside] Re: Time Zone Point of Curiosity

David T. Lewis lewis at mail.msen.com
Sat Dec 16 15:21:51 UTC 2006


On Sat, Dec 16, 2006 at 01:52:36AM +0000, Alan Lovejoy wrote:
> Modernly, applications rely on the host operating system to have its time zone 
> correctly set to local time (and to handel DST transitions.)  
> 
> In a sense, Squeak does this as well, since its system clock runs in local 
> time, based on whatever local time the host OS claims is correct. But Squeak 
> has no idea what the current offset from Universal Time happens to be.  So, as 
> long as the host computer and OS have local time correct, Squeak will also--but 
> it won't know how local time relates to the equivalent time in any specific 
> time zone, nor will it be able to authoritatively determine what the local time 
> will be any number of seconds earlier or later than the current time (because 
> it has no idea when the previous or next DST offset transition might be, if 
> any.)

For Squeak, the TimeZoneDatabase (on SqueakMap) handles this. It uses
actual Olson time zone tables, so no plugin is required, and it's integrated
with Squeak's Chronology classes so that durations are correctly calculated
across DST transitions and so forth. The tables can be updated to keep up
with new time zone rules. Typically you would just load them from the
zoneinfo files on your server if it's a unix box.

Most Squeak users have no real need for this, but it might be quite useful
if you are implementing a Seaside server with users in different time zones.

TimeZoneDatabase has been around since 1999, so it's fairly stable. I
don't know how many people actually use it gets though; probably not
too many since I rarely hear mention of it.

Dave



More information about the Seaside mailing list