[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / misc / examples / io / io020 / Main.hs
diff --git a/ghc/misc/examples/io/io020/Main.hs b/ghc/misc/examples/io/io020/Main.hs
new file mode 100644 (file)
index 0000000..ff68bd9
--- /dev/null
@@ -0,0 +1,13 @@
+import LibTime
+
+main = 
+    getClockTime >>= \ time ->
+    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)
+    in
+        putText time >>
+       putChar '\n' >>
+       putText time' >> 
+       putChar '\n'