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

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to