logo       

Re: [GHC] #588: Exception: Time.toClockTime: picoseconds out of range: msg#00051

lang.haskell.glasgow.bugs

Subject: Re: [GHC] #588: Exception: Time.toClockTime: picoseconds out of range

#588: Exception: Time.toClockTime: picoseconds out of range
-----------------------------+----------------------------------------------
Reporter: anonymous | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries/base | Version: 6.4.1
Severity: normal | Resolution:
Keywords: | Os: Unknown
Difficulty: Easy (1 hr) | Architecture: Unknown
-----------------------------+----------------------------------------------
Changes (by dylex@xxxxxxxxx):

* architecture: => Unknown
* difficulty: => Easy (1 hr)
* component: GHCi => libraries/base
* os: => Unknown

Comment:

I ran into this too. I think this patch fixes it (I presume that's why
the
FIXME was there):

{{{
--- libraries/base/System/Time.hsc.orig 2006-03-09 20:25:14.000000000
-0800
+++ libraries/base/System/Time.hsc 2006-03-09 20:28:37.000000000
-0800
@@ -270,8 +270,8 @@
60 * toInteger min +
3600 * toInteger hour +
24 * 3600 * toInteger day
- cal = toUTCTime (TOD (c_sec + sec_diff) (c_psec + psec))
- -- FIXME! ^^^^
+ (d_sec, d_psec) = (c_psec + psec) `quotRem` 1000000000000
+ cal = toUTCTime (TOD (c_sec + sec_diff + d_sec) d_psec)
new_mon = fromEnum (ctMonth cal) + r_mon
month' = fst tmp
yr_diff = snd tmp
}}}

--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/588>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise