Skip to content

Instantly share code, notes, and snippets.

@mulander
Created January 13, 2012 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mulander/1608366 to your computer and use it in GitHub Desktop.
Save mulander/1608366 to your computer and use it in GitHub Desktop.
GHCi, version 7.0.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Prelude> :m +System.Time
Prelude System.Time> getClockTime
Loading package old-locale-1.0.0.2 ... linking ... done.
Loading package old-time-1.0.0.6 ... linking ... done.
Fri Jan 13 20:52:34 *** Exception: <stdout>: hPutChar: invalid argument (charact
er is not in the code page)
Prelude System.Time>
Prelude System.Time> :m +Control.Monad
Prelude System.Time Control.Monad> liftM show getClockTime
"Fri Jan 13 21:01:56 \140rodkowoeuropejski czas stand. 2012"
Prelude System.Time Control.Monad>
Prelude System.Time Control.Monad> getClockTime >>= toCalendarTime
CalendarTime {ctYear = 2012, ctMonth = January, ctDay = 13, ctHour = 21, ctMin =
43, ctSec = 50, ctPicosec = 24819000000, ctWDay = Friday, ctYDay = 12, ctTZName
= "\140rodkowoeuropejski czas stand.", ctTZ = 3600, ctIsDST = False}
Prelude System.Time Control.Monad>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment