[time-nuts] The Problem with Time & Timezones - Computerphile

cheater00 . cheater00 at gmail.com
Sat May 10 03:28:10 EDT 2014


On 9 May 2014 21:01, "Hal Murray" <hmurray at megapathdsl.net> wrote:
>
>
> holrum at hotmail.com said:
> > Ahh,  but with Lady Heather you can specify the time zone offset (down
to
> > the second) and the when the daylight savings time switchovers occur.
And
> > from experience,  I can tell you that the code to do it is a royal pain
in
> > the ass...  not all that hard to do,  but a pain to test.
>
> Part of the problem is that "when the daylight savings time switchovers
> occur" changes over time.  The problem is a whole lot easier if all you
are
> interested in is converting the current UTC to the current local time.
>
> The *nix world uses the time-zone database.  I assume it is available on
> Windows too.
>   https://en.wikipedia.org/wiki/Tz_database

That is the Olson Timezone Database, aka tzdata. I wrote a compiler for it
once, the format is very fun to parse and there are some great things to be
learned. Specifically figuring all edge cases was a fun exercise.



More information about the time-nuts mailing list