I searched for a long time to find a database that I could locally localize to map lat + lon coordinates to the time zone (i.e. no dependency on the remote service). This is the best I could come up with.
A vectorized timezone map is available here: http://georezo.net/jparis/Data/wrldtz_tab.htm . This is a database of nearly 2,000 "regions." Each area is defined by a multitude of polygons on the surface of the Earth, and it tells you what time zone you are in if you are inside this region.
There are major disadvantages:
- It has not been updated since 2002.
- It only defines polygons above the ground (if you are above water, you are not considered to be in any time zone).
- This does not give you Olson IDs for time zones, only the name of the country and the UTC offset (standard time).
The last limitation may not be a big problem for you: there are not many time zones, and perhaps you can invest time to manually assign each of your Olson names (especially if you are only interested in a small number of time zones).
To read data files that you can download from the above website, you will need to use this library . I could come up with sample code if you are interested.
The use of a physical (postal) address is also mentioned. Translating this data into lat + lon coordinates is a whole separate issue, and I assume that you cannot handle this well without using any online / remote service.
-Phil
Celada
source share