Opened 9 years ago

Closed 9 years ago

Last modified 6 years ago

#882 closed bug (fixed)

Overflow bug in System.Time

Reported by: simonpj Owned by:
Priority: normal Milestone:
Component: libraries/base Version: 6.4.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

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.

Change History (3)

comment:1 Changed 9 years ago by igloo

  • Resolution set to fixed
  • Status changed from new to closed

I've applied the fix from the HEAD to the 6.4 STABLE CVS branch.

Thanks
Ian

comment:2 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:3 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.