Format UTCTime into a short human readable format.
formatAsLogTime $ UTCTime (fromGregorian 2016 1 23) 5025.123456789012"2016-01-23 01:23:45"
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27
Modulekatip-0.8.8.0Haskell2010
Time and memory efficient time encoding helper functions.
Format UTCTime into a short human readable format.
formatAsLogTime $ UTCTime (fromGregorian 2016 1 23) 5025.123456789012"2016-01-23 01:23:45"
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.
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"