Friday, April 14, 2006

Day 346

I've found myself thinking about timezones recently, and how much of a pain they are. It seems to be difficult for software to get timezone stuff right, which I guess is because the core data for timezones is set by administrative fiat rather than anything predictable.

So wouldn't it be helpful if there was a time zone server out there on the internet? A centralized place that held up-to-date timezone information, which would handle various standardized queries:

  • Return a list of available timezones.
  • Given a timezone identifier, return information about that timezone (offset from UTC, dates for DST shifts, amount of DST shift).
  • Given a timezone identifier and a UTC date/time, return the corresponding local time for that timezone.
  • Given a GPS location, return timezone for that location.
  • Given an IP address, return timezone for the reverse-lookup of the location for that IP address.

Obviously, the raw Olsen data for this kind of thing is out there, but none of the web resources seem to quite do everything. Of course, if there were such a server it would need to cope with idiots abusing it.

No comments: