[Haskell-cafe] Data.Time

Ashley Yakeley ashley at semantic.org
Mon Jul 4 07:08:12 CEST 2011


On 2011-07-02 14:03, Yitzchak Gale wrote:
> Not exactly. A "TimeZone" in Data.Time doesn't really
> represent a time zone - it represents a specific clock setting
> in a time zone.

I still regret this! I should have called it TimeOffset or somesuch.

> To get a TimeZoneSeries, representing a time zone with
> all of its known clock changes throughout history and some
> years into the future, use the timezone-olson package[2] to
> read an Olson time zone file. On Linux and Mac OS X
> systems, Olson time zone files are available in the directory
> /usr/share/zoneinfo.

Leap second data is there too, so it should be possible to create a 
Data.Time.Clock.TAI.LeapSecondTable from it.

Also, it might be worth creating an OS-specific package that dealt with 
the filepaths for you, so for instance you could read in a 
TimeZoneSeries given a time zone name such as America/Los_Angeles.

-- 
Ashley Yakeley



More information about the Haskell-Cafe mailing list