On Tue Nov 18 2014 at 6:11:06 PM Brandon Allbery <allbery.b@gmail.com> wrote:
On Tue, Nov 18, 2014 at 5:02 PM, Bram Neijt <bneijt@gmail.com> wrote:
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].

Use old-locale. It was inappropriately deprecated with no replacement, and nobody seems to want to bother either fixing or replacing it.


You also can use hourglass (http://hackage.haskell.org/package/hourglass).
I think it is a good replacement to 'time'.
It also provides the ISO8601 Time format you need (see example below). I hope this will help you.

import Data.Hourglass
import System.Hourglass

main :: IO ()
main = do
    tc <- timeCurrent
    putStrLn $ timePrint ISO8601_DateAndTime tc

2014-11-18T22:06:50+00:00