Bug in old-locale?

Deniz Dogan deniz.a.m.dogan at gmail.com
Mon Apr 20 11:27:31 EDT 2009


Hi

Is there a bug in the old-locale package? I tried the following simple program:

import Data.Time
import System.Locale

main = do
 time <- getCurrentTime
 putStrLn $ formatTime defaultTimeLocale rfc822DateFormat time

The above program prints:

Mon, d Apr 2009 15:23:56 UTC

Notice "Mon, d", where "d" should be the day of the month. Looking at
the source code in the package, I see:

rfc822DateFormat = "%a, %_d %b %Y %H:%M:%S %Z"

So what's up with %_d?

--
Deniz Dogan


More information about the Libraries mailing list