summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/lib/Time/time004.hs
blob: 9a281a10da46d9a8b0f393dcb162321762429dd0 (plain)
1
2
3
4
5
6
7
8
9
10
import System.Time

main :: IO ()
main = do
    time <- getClockTime
    let (CalendarTime year month mday hour min sec psec 
                      wday yday timezone gmtoff isdst) = toUTCTime time
        time' = toClockTime (CalendarTime (year - 1) month mday hour min sec psec
                             wday yday timezone gmtoff isdst)
    print (length (show time) == length (show time'))