49 CFR 71 is both a fascinating cure for insomnia, and an invaluable source of information for timezone borders within the US.
BEECEE's Diary
Recent diary entries
Adding in timezone information for single-zone countries
Posted by BEECEE on 13 February 2012 in English.My First OSM Diary Entry.
A long time ago (pre-OSM), I wrote a perl library for translating locations into timezones, as part of a larger geo-photo web site. While the internal version of that library had detailed data, the copyright on the detailed geo-information did not allow for public release, and so the public release of the code languished behind.
Being reminded of the public library's existence recently, I've started looking at sourcing the geo information from OSM. One initial problem is that the OSM dataset mostly lacks the timezone information. But it can be edited!
For this work, there are two classes of relation objects that I intend to apply timezone tags to. The first class covers relation objects covering all or part of countries with a single timezone. After working through a handful of these by hand, I've put the workflow into a script, and it has happily applied k=timezone tags from http://en.wikipedia.org/wiki/List_of_tz_database_time_zones onto matching relation objects.
The second class of relation objects concerns countries that have multiple timezones. Instead of the country-level object, the timezone tag needs to be applied to the largest relation object wholly within each timezone. For countries where each of their state/provinces is in particular timezone, applying the timezone tag to the state/province-level relation object is easy.
For countries where each local area chooses their own timezone, a lot more research is required. Among others, this is the case with a number of Native American reservations which observe a different timezone from the state that they are in. This makes properly applying the timezone information for the second class of relation objects a much-less automated process.