Ticket #2519 (closed bug: wontfix)

Opened 5 years ago

Last modified 4 months ago

Time.toClockTime: picoseconds out of range, after diffClockTimes

Reported by: Ansible Owned by:
Priority: normal Milestone: _|_
Component: GHCi Version: 6.8.2
Keywords: TimeDiff Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I've found a consistent problem where the picoseconds field of TimeDiff? is less than zero. I'm attaching a program that is able to reproduce this problem under 6.8.2.

Attachments

PicoTest.hs Download (1.3 KB) - added by Ansible 5 years ago.
This is able to reproduce the bug, at least for me.
PicoTest2.hs Download (408 bytes) - added by Ansible 5 years ago.
PicoTest?2.hs

Change History

Changed 5 years ago by Ansible

This is able to reproduce the bug, at least for me.

Changed 5 years ago by Ansible

Output from PicoTest?.hs:

*Main> main Welcome to the picotest. Enter 'q' to quit. Hit enter for test:

Clocktime1 1218999538 seconds; 896297000000 picoseconds. Clocktime2 1218999539 seconds; 943780000000 picoseconds. TimeDiff? TimeDiff? {tdYear = 0, tdMonth = 0, tdDay = 0, tdHour = 0, tdMin = 0, tdSec = 1, tdPicosec = 47483000000} converted to seconds: 1.047483 Hit enter for test:

Clocktime1 1218999539 seconds; 946978000000 picoseconds. Clocktime2 1218999540 seconds; 931424000000 picoseconds. TimeDiff? TimeDiff? {tdYear = 0, tdMonth = 0, tdDay = 0, tdHour = 0, tdMin = 0, tdSec = 1, tdPicosec = -15554000000} converted to seconds: *** Exception: Time.toClockTime: picoseconds out of range

Changed 5 years ago by Ansible

PicoTest?2.hs

Changed 5 years ago by Ansible

Output from PicoTest?2.hs. Does not produce the bug, although the same ClockTime? values are used.

[1 of 1] Compiling Main ( PicoTest?2.hs, interpreted ) Ok, modules loaded: Main. *Main> main TimeDiff? {tdYear = 0, tdMonth = 0, tdDay = 0, tdHour = 0, tdMin = 0, tdSec = -1, tdPicosec = 15554000000} -0.984446 *Main>

Changed 5 years ago by igloo

  • difficulty set to Unknown
  • milestone set to _|_

I recommend you use the new time package instead of old-time.

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple

Changed 4 months ago by monoidal

  • status changed from new to closed
  • failure set to None/Unknown
  • resolution set to wontfix

Closing - the ticket concerns old-time which is abandoned.

Note: See TracTickets for help on using tickets.