Time zone confusion and implementation hints

Yves Goergen nospam.list at unclassified.de
Fri Jul 2 19:51:03 UTC 2010

On 02.07.2010 18:59 CE(S)T, David Patte wrote:
> Yves, there are of course, many approaches to analysing the data, but 
> parsing (or compiling) the files in the gz into zone, link, rule records 
> is fairly straightforward. You can then sort the records, remove 
> redundant records, and link the structures.
> The resulting table can then searched using binary searching and a 
> little bit of table walking to identify the rule in effect for a 
> particular zone & time.

A (binary searchable) table implies a flat two-dimensional structure.
Zones and rules are more than two-dimensional. At the point when I
resolve zones and rules into a linear table, I think I lose the
efficient storage and need to write out the transition times for all
years separately, which will be huge.

I think I need to retain the original data structure in my code and then
evaluate it all at runtime, finding the right rule set in the zone, then
iterating all rules to find the current UTC offset.

> I have acquired permission from this end to produce a commercial DLL to 
> wrap our tz parser and time converter algorithms as a licensable product 
> if there is enough interest.

Sorry, not by me. I am creating a free (maybe open-source) product and
where is no money, none can flow. Also, yours is probably native C code
which I don't like to use in C# and probably cannot use in Java on Android.

Actually I don't see the big problem in writing the code that does all
this. It's finding a working algorithm at all, at least that I can run
it in my brain.

Yves Goergen "LonelyPixel" <nospam.list at unclassified.de>
Visit my web laboratory at http://beta.unclassified.de

More information about the tz mailing list