TimeZone by Coordinate

I have solved this with a client application. The technique was to make a color-coded cylindrical map of the world, each time zone has a unique color. Lat-Lons are converted to picture co-ordinates and the color of the co-ordinate is read then cross-referenced to the timezone of that color.

That short explaination isn't exactly what I did but it gets the idea across. I actually populated a couple dictionaries and did lookup from them. The first rendition took 2M of resource file to populate (after I processed my map and turned it into binary data). The theoretical max error (for latitudes near the equator) should have been +/- about 15 miles. Unfortunately my starting map's accuracy was more like +/- 100 miles.

So I'm redoing the project. I've been into it several days now creating a both more accurate and higher-rez map to crunch. A couple more days and it should be done. The resource file will be around 20M unless I choose only to resource the "goofy areas" and mathematically compute the 90% of the world that can be calculated directly (most of the world's can be mathematically derived from longitude). Not sure many would care that a resource file was 20M but some might. At any rate, if there seems to be some interest, I'll try to post the code necessary to run it here and the resource file one one of the public code sites. If there seems to be no interest, I won't bother.

Just to re-iterate a bit, the code necessary in your app is only a few lines, but the resource file is big (w/o shrinking it, my new one is running 22M). It is also fast (the first rendition ran 100M / sec). It DOES require a file load and that takes a little time. The 2M version had no noticeable delay but 22M might (not there yet).


Check the tz database. I know it associates names to timezones (like city, countries, EST, etc). But I believe there is an extension for coordinates somewhere.