Time zone confusion and implementation hints

Yves Goergen nospam.list at unclassified.de
Mon Jul 5 16:35:45 UTC 2010

On 02.07.2010 16:18 CE(S)T, Yves Goergen wrote:
> Is there some higher-level algorithm available of how that works?

Here's my first draft of today. It describes a function to determine the
effective UTC offset for local time at a specified UTC timestamp. This
can be used for converting from UTC to local time.

The basic idea is to keep the tz database text files' data structure and
work on it at runtime. It may be a little slower, but I intend to put
caching means into it later. The advantage of this is that it can be
used for an arbitrary date while keeping the data storage as small as
possible. (You know, 2038 is not the end of the world...) My algorithm
assumes that time zones (the Zone lines with all their continuation
lines), rule sets (the individual Zone and continuation lines) and rules
(the Rule lines) are available as application data.

Is somebody able and willing to take a look at it to spot big mistakes?

BTW, is there some kind of test suite to validate implementations
against the original C code?

Yves Goergen "LonelyPixel" <nospam.list at unclassified.de>
Visit my web laboratory at http://beta.unclassified.de
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tz_algorithm.txt
Url: http://mm.icann.org/pipermail/tz/attachments/20100705/0e5db398/tz_algorithm-0001.txt 

More information about the tz mailing list