
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? thanks, Jeff --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Quoth Jeff Polakow, nevermore,
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?
That *sounds* suspiciously like the Year 2038 problem [1]. I thought it only applied to Unix systems but maybe the library assumes something it shouldn't at some point. [1]: http://en.wikipedia.org/wiki/Year_2038_problem -- Dougal Stanton

At Tue, 20 Mar 2007 12:02:20 -0400, Jeff Polakow wrote:
[1
] [1.1 ] 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.

"Jeremy Shaw"
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.
Curiously, Hoogle doesn't seem to have it indexed yet -- I was looking for it just the other day and didn't find it. I'm glad it's there in 6.6 -- Jón Fairbairn Jon.Fairbairn@cl.cam.ac.uk http://www.chaos.org.uk/~jf/Stuff-I-dont-want.html (updated 2006-09-13)
participants (4)
-
Dougal Stanton
-
Jeff Polakow
-
Jeremy Shaw
-
Jón Fairbairn