timezones

Craig Latta Craig.Latta at NetJam.ORG
Thu Dec 2 21:57:21 UTC 1999


> > The right thing, it seems to me, would be a group of servers
> > which answered the current offset from UTC for a given latitude
> > and longitude. That, in combination with current UTC time via the 
> > Network Time Protocol, would yield reasonably accurate local time.
> 
> I still think the two queries should be merged into one somehow;
> otherwise, you might query the time zone right before daylight time
> takes effect, and then query the time after the shift, and end up with a
> time which is off by an hour.

	I wasn't necessarily advocating using two queries. I'd simply like to see timezone definitions handled by a minimal number of authoritative sources, rather than duplicating the (complicated) algorithms amongst every client machine (ususally incompletely and incorrectly).

	This could be an extension to NTP. Alternatively, one could use a local UTC clock and timezone offset, set in two queries. Once the local UTC clock was set, one's accuracy would be limited by the drift of the local clock and the currency of the last timezone request. The vast majority of people are willing to put up with their local clock drift over a period of minutes; few people require externally-sanctioned timestamps for every time inquiry (I certainly don't).

> Also, many OS's already have reasonable understanding of timezones
> (although their databases aren't always so great). It seems a shame to
> just ignore that information.

	I would happily ignore it in favor of information which is much more likely to be correct, and which is much easier to maintain.

> Also, Squeak in the future may well have a good timezones library...

	I posit there is no such thing. Timezones are defined politically, subject to no central authority, as far as I can tell.

> ...the appropriate thing to access off the network is the database of 
> timezones, not the current offset.

	Assuming the library is kept correct continuously (not easy), then this would amount to the same thing. If it weren't, it wouldn't be useful.


-C





--
Craig Latta
composer and computer scientist
craig.latta at netjam.org
www.netjam.org
latta at interval.com
Smalltalkers do: [:it | All with: Class, (And love: it)]





More information about the Squeak-dev mailing list