[Haskell-cafe] ISO 8601 Date time format without old-locale?
Bram Neijt
bneijt at gmail.com
Tue Nov 18 17:02:12 UTC 2014
I want to do ISO8601 formatting of a date with a numeric zone offset
and I can't seem to find a way of doing it without requiring the
old-locale package[1].
What is the current method of obtaining and formatting time
representation if old-locale is old?
Greetings,
Bram
[1] A sketch of the code using old-locale:
-- 2014-11-18T06:37:04+00:00
iso8601DateTimeFormat :: String
iso8601DateTimeFormat = "%FT%T%z"
main = do
now <- getCurrentTime
putStrLn $ formatTime defaultTimeLocale iso8601DateTimeFormat now
Which requires "defaultTimeLocale" from the old-locale package.
More information about the Haskell-Cafe
mailing list