[Haskell-cafe] Re: data.time.zoneinfo
Anatoly Yakovenko
aeyakovenko at gmail.com
Thu Oct 21 01:42:36 EDT 2010
passing a full path seems to work, despite the fact that the documentation says
newContext :: Maybe String -> IO ContextSource
Create a Context object. A path to the zone-info database may be
specified. Otherwise, the TZDIR environment variable, or a reasonable
default, will be used. An IOError will be thrown on failure.
On Wed, Oct 20, 2010 at 10:40 PM, Anatoly Yakovenko
<aeyakovenko at gmail.com> wrote:
> I am trying to figure out how to use this library, seems like this should work
>
>
> Prelude Data.Time.ZoneInfo> ctx <- newContext Nothing
> Prelude Data.Time.ZoneInfo> name <- zoneInfoName (utcOlsonZone ctx) True
> Prelude Data.Time.ZoneInfo> newOlsonZone ctx name
> *** Exception: Data.Time.ZoneInfo.newOlsonZone: invalid argument
> (Invalid argument)
>
>
> but it doesn't, neither does
>
>
> Prelude Data.Time.ZoneInfo> newOlsonZone ctx "America/New_York"
> *** Exception: Data.Time.ZoneInfo.newOlsonZone: invalid argument
> (Invalid argument)
>
>
> and my zoneinfo seems to be kosher on my machine
>
>
> $ ls /usr/share/zoneinfo/America/New_York
> /usr/share/zoneinfo/America/New_York
>
>
> $ ls /usr/share/zoneinfo/GMT
> /usr/share/zoneinfo/GMT
>
>
> what am i missing?
>
More information about the Haskell-Cafe
mailing list