The default output from darcs changes for dates is "Fri Jan 13 21:01:56
\140rodkowoeuropejski czas stand. 2012" on MS Windows Vista with Polish default locale.
The name of the day and the month is in English but part of the date string is in Polish
meaning Central European Standard Time.
Please stick to one language in the date string.
Results of a small test that I did on request by Heffalump using ghci.
GHCi, version 7.0.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Prelude> :m +System.Time
Prelude System.Time> getClockTime
Loading package old-locale-220.127.116.11 ... linking ... done.
Loading package old-time-18.104.22.168 ... linking ... done.
Fri Jan 13 20:52:34 *** Exception: <stdout>: hPutChar: invalid argument (charact
er is not in the code page)
Prelude System.Time> :m +Control.Monad
Prelude System.Time Control.Monad> liftM show getClockTime
"Fri Jan 13 21:01:56 \140rodkowoeuropejski czas stand. 2012"
Prelude System.Time Control.Monad>
It's coming via
- System.Time.calendarTimeToString, which uses
- System.Locale.defaultLocale, which defines English weekday names and
the format string "%a %b %e %H:%M:%S %Z %Y"
- %a translates to a lookup into the weekday names
- %Z translates to a lookup into the struct tm returned by localtime (I
guess the mingw/gcc one, but it seems to behave like the VC++ one:
It is possible to alter the output of localtime by setting the TZ
environment variable in Windows, but it's not clear what controls the
language the text is in, and when TZ is overridden (e.g. TZ=EST5EDT)
then the output seems to just end up as a short timezone string like
Arguably this is something that could be improved in the Haskell
time/locale libraries should handle better. In any case, there might be
a more native-Windowsy way to display a timezone. Or we could just stop