[Haskell-cafe] Re: why doesn't time allow diff of localtimes ?
uzytkownik2 at gmail.com
Thu Apr 1 00:20:25 EDT 2010
On Wed, 2010-03-31 at 19:29 -0700, briand at aracnet.com wrote:
> On Wed, 31 Mar 2010 01:32:56 -0400
> wagnerdm at seas.upenn.edu wrote:
> > Two values of LocalTime may well be computed with respect to
> > different timezones, which makes the operation you ask for dangerous.
> > First convert to UTCTime (with localTimeToUTC), then compare.
> that makes sense. unfortunately getting the current timezone to
> convert to UTC results in the dreaded IO contamination problem...
Hmm. Where do you get the local times from in the first place?
PS. As the timezone can change in runtime (like change from summer time
to standard or simply crossing the 'border' with laptop) I don't think
that there is escape from IO.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 836 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20100331/a2c5d4d0/attachment.bin
More information about the Haskell-Cafe