Time library discussion (reprise)

ketil+haskell at ii.uib.no ketil+haskell at ii.uib.no
Thu Nov 13 11:46:06 EST 2003


"Simon Marlow" <simonmar at microsoft.com> writes:

> This is the nub of the problem: the proposal does provide such
> functionality, but it isn't implementable on Unix systems.

..but it is, for times where leap second information is available (and
where the underlying behavior is known)?

> I think you're assuming that the timezone TLAs don't represent fixed
> offsets relative to UTC.  I assume that they do.

Yes.  I've tried to check, but I don't find any handy references by
superflous googling.  

> For example, here we are in timezone GMT at the moment (== UTC+0000),
> but we switch to BST in the summer (UTC+0100).

It appears you're right:

    sefirot% date
    Thu Nov 13 11:39:19 CET 2003
    sefirot% date 07011000
    date: cannot set date: Operation not permitted
    Tue Jul  1 10:00:00 CEST 2003

> I just looked up the list of timezone abbreviations, and it's pretty
> short.  The library could easily include this list.

>>         data Timezone = UTC | GMT | PDT ... deriving ...
>>         data TZOffset = -- abstract (or just an Int)

> Not sure what this would buy us.

Reversibility?  I was assuming that there was, perhaps, a one-to-many
relationship between names and offsets.  Apparently this is wrong, and
the three/four-letter abbreviations are just a more complex way to say
Alpha, Bravo ... Zulu time (or +0100, -0100, +0200...).

> Yes, but don't confuse geographical locations with timezones.

Okay.  It seems I was mistaken about this.

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants


More information about the Libraries mailing list