[Haskell-cafe] toClockTime
Jeremy Shaw
jeremy.shaw at linspireinc.com
Tue Mar 20 14:57:34 EDT 2007
At Tue, 20 Mar 2007 12:02:20 -0400,
Jeff Polakow wrote:
>
> [1 <multipart/alternative (7bit)>]
> [1.1 <text/plain; US-ASCII (7bit)>]
> Hello,
>
> On my system, GHC 6.6 running on windows xp, System.Time.toClockTime
> fails on calendar times later than (by days, I didn't check hours,
> minutes, etc.) January 18, 2038. Is this a bug?
This is the famous unix epoch bug -- unix time is based on the number
of seconds since some date in 1970. About 4 billion seconds later is
2038, and the counter wraps around.
Try using Data.Time instead -- it was written by a self-professed time
nerd, and probably works correctly. It was added in GHC 6.6 and
largely supercedes System.Time.
j.
More information about the Haskell-Cafe
mailing list