lat/lon to time offset database

Larry Ober larry.ober at att.net
Thu Feb 3 18:33:27 UTC 2011


I'm a nubie at understanding the ins and outs of timezones so please forgive 
me for my potentially dumb questions.

I am looking at building a small embedded system (No OS) that will require 
determining the local time from the lat/lon of a location. So basically I need 
lat/lon to time offset from "GMT".

I don't really need the geo political information like country or city. 
However it seems like tz is structured continent/country/city/... 

Now maybe I already have what I need but I just don't understand it. I have a 
copy of timezone.csv that seems to include data from country code to city etc. 
This seems to point to what looks like coordinate data that I don't understand.

An example for America/New York seems to point to an area 115. There then seem 
to be multiple 115 entries like the following;

115, 3907893600, -18000, EST, 0
115, 3919388400, -14400, EDT, 1

My interpretation is that 115 is the area, the next column should be some sort 
of latitude, next seems to be called an offset in other contexts, next is the 
used name of the zone followed by a true/false bit.

If this is basically true, I guess that what I don't understand it how 
to "parse" the latitude and how to use the longitude offset.

Of course maybe I have this entirely wrong.

I would appreciate any help on this basic issue.

Regards

Larry




More information about the tz mailing list