Issue 2127 The default date output on Windows Vista with Polish locale is half English half Polish

Title The default date output on Windows Vista with Polish locale is half English half Polish
Priority bug Status wont-fix
Milestone Resolved in
Superseder wish: convert to ISO-8601 as default date format
View: 140
Nosy List mulander
Assigned To
Topics UI

Created on 2012-01-13.20:10:11 by mulander, last changed 2012-01-13.21:56:32 by ganesh.

msg15004 (view) Author: mulander Date: 2012-01-13.20:10:10
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- ... linking ... done.
Loading package old-time- ... linking ... done.
Fri Jan 13 20:52:34 *** Exception: <stdout>: hPutChar: invalid argument (charact
er is not in the code page)
Prelude System.Time>
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>
msg15006 (view) Author: mulander Date: 2012-01-13.20:15:13
Forgot to mention that the default used by python is much saner:

>>> import datetime
>>> print datetime.datetime.today()
2012-01-13 20:55:20.072000
msg15009 (view) Author: kowey Date: 2012-01-13.21:43:51
One way to resolve this would be just to switch to a neutral date format.  
I suggest we focus on that
msg15011 (view) Author: ganesh Date: 2012-01-13.21:56:31
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 
doign that.
Date User Action Args
2012-01-13 20:10:11mulandercreate
2012-01-13 20:15:14mulandersetmessages: + msg15006
2012-01-13 21:43:53koweysetpriority: bug
status: unknown -> wont-fix
topic: + UI
superseder: + wish: convert to ISO-8601 as default date format
messages: + msg15009
2012-01-13 21:56:32ganeshsetmessages: + msg15011