Skip to content

Overflow bug in System.Time

Frederik Eaton reports: The Glorious Glasgow Haskell Compilation System, version 6.4.3.20060816

> now <- getClockTime
> addToClockTime (TimeDiff {tdYear = 0, tdMonth = 0, tdDay = 0, tdHour = 0, tdMin = 0, tdSec = 0, tdPicosec = 999999999999}) now
*** Exception: Time.toClockTime: picoseconds out of range

This is clearly a bug. Simon Marlow comments: System.Time is kind-of deprecated: the new time package is intended to supercede it, but I have been reluctant to really deprecate System.Time because it comes from Haskell98, and also because we don't have much experience with its replacement.

Trac metadata
Trac field Value
Version 6.4.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/base
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information