[darcs-devel] [issue2127] The default date output on Windows Vista with Polish locale is half English half Polish

Ganesh Sittampalam bugs at darcs.net
Fri Jan 13 21:56:32 UTC 2012


Ganesh Sittampalam <ganesh at earth.li> added the comment:

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: 
http://msdn.microsoft.com/en-us/library/bf12f0hc(v=vs.80).aspx)

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 
"EST".

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.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue2127>
__________________________________


More information about the darcs-devel mailing list