ANN: Enhancements to timezone processing in Data.Time

Ashley Yakeley ashley at
Mon May 24 02:05:00 EDT 2010

On 2010-05-20 14:16, Yitzchak Gale wrote:
> The new timezone-series and timezone-olson packages provide
> enhancements to timezone processing in Haskell's time
> package, Data.Time.

Excellent. I'd been considering doing something like this.

> These enhancements are related to the fact that the
> Data.Time.TimeZone data type does not fully represent a
> timezone - it only represents a specific clock setting for a
> timezone, as is traditional for time APIs.

My TimeZone type is a bit odd. It's a time offset, with metadata, 
specifically an "is DST" flag and a three-letter name. (Three-letter 
names are ambiguous and not recommended for identifying time-zones, 
btw.) It's basically the information returned by localtime_r. It's also 
arguably the wrong name for the type.

I'm wondering if it would be worth having a TimeOffset type containing 
just the timeZoneMinutes member, and using that in most places instead 
of TimeZone?

> o There is not yet a truly platform-independent way of
>    finding the Olson files for Unix-like platforms. Nowadays
>    /usr/share/zoneinfo is a very popular location for them,
>    but some platforms have them elsewhere.

Can this be discovered at build time? That's all that's needed.

Ashley Yakeley

More information about the Libraries mailing list