lat/lon to time offset database

Tim Thornton tt at smartcomsoftware.com
Thu Feb 3 19:48:32 UTC 2011


You don't need to know all the politics and states, but you do need to have
bounding polygons for each zone area. I am not aware of a source of this
information (if anyone else does, I'd like to know, as it would be useful to
me too). In many areas it is straightforward if tedious to research and
create this, but if you go to out of the way places you'll probably end up
guessing quite a bit of it!

If you are just looking at current dates, then you can probably simplify the
database quite a lot, as many zones exist to cover historical variations.

Also, time data does vary with depressing regularity, so you will need to
look at updating your database.

Tim

Smartcom Software Ltd
Portsmouth Technopole
Kingston Crescent
Portsmouth PO2 8FA
United Kingdom

www.smartcomsoftware.com

Smartcom Software is a limited company registered in England and Wales,
registered number 05641521.


-----Original Message-----
From: Larry Ober [mailto:larry.ober at att.net] 
Sent: 03 February 2011 18:33
To: tz at lecserver.nci.nih.gov
Subject: lat/lon to time offset database

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