HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulekatip-0.8.8.0Haskell2010

Katip.Format.Time

Time and memory efficient time encoding helper functions.

  • 2 values
  • Packagekatip-0.8.8.0
  • Exports2
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceTime.hs
valueformatAsLogTime :: UTCTime -> Text
#

Format UTCTime into a short human readable format.

Example1 expression
formatAsLogTime $ UTCTime (fromGregorian 2016 1 23) 5025.123456789012"2016-01-23 01:23:45"
valueformatAsIso8601 :: UTCTime -> Text
#

Format UTCTime into a Iso8601 format.

Note that this function may overcommit up to 12*2 bytes, depending on sub-second precision. If this is an issue, make a copy with a copy.

Example3 expressions
formatAsIso8601 $ UTCTime (fromGregorian 2016 1 23) 5025.123456789012"2016-11-23T01:23:45.123456789012Z"formatAsIso8601 $ UTCTime (fromGregorian 2016 1 23) 5025.123"2016-01-23T01:23:45.123Z"formatAsIso8601 $ UTCTime (fromGregorian 2016 1 23) 5025"2016-01-23T01:23:45Z"