On Thu, 10 May 2007, Harder, Paul wrote:
One of our problems is to automate the task of deciding what time zone pertains, given the locality. In other words, if the location is "KIAH", which is the ICAO code for Houston Intercontinental Airport in Houston, Texas, how can I know what time zone pertains to that location? Once I know the zone, there are any number of solutions to the problem of figuring out what is the current offzet from Z. But knowing the zone is nontrivial.
This is a pretty hard problem. If you look at the Olson database, it does come with a file, zone.tab, that gives the country code and lat/long for a number of time zones.
One approach might be to figure out the lat/long of all the airports via geocoding, which I'm sure Google can do, and then pick the _closest_ time zone in the same country.
However, I wouldn't be surprised to find out that some airports are closest to a different time zone.
What we really need is an API that goes from lat/long to time zone with 100% accuracy. This would be useful for many applications. If you find one, let us know ;)
-dave /*=================================================== VegGuide.Org www.BookIRead.com Your guide to all that's veg. My book blog ===================================================*/
