Replace obsolete `defaultUserHooks` by `autoconfUserHooks`
[packages/old-time.git] / tests / time002.hs
1 import System.Time
2
3 -- !!! check that we can read the current ClockTime, convert it
4 -- !!! to CalendarTime and back again, and that all three times when
5 -- !!! converted to strings compare equal.
6
7 main = do
8 t <- getClockTime
9 let clock = show t
10 c <- toCalendarTime t
11 let cal = calendarTimeToString c
12 let t2 = toClockTime c
13 clock2 = show t2
14 if (clock == cal && clock == clock2)
15 then putStrLn "Ok."
16 else putStrLn "Failed."