STINNER Victor <victor.stin...@haypocalc.com> added the comment:

On Linux, cfmt.py fails on fr_FR locale (the only valid locale in the list of 
tested locales):
---
fr_FR [mer. 12 janv. 2011 11:30:35 CET] %a %d %B %Y %H:%M:%S %Z != %a %d %b %Y 
%T %Z
---

The problem is the month format: locale.nl_langinfo(locale.D_T_FMT) returns '%a 
%d %b %Y %T %Z', but _strptime (LocaleTime().LC_date_time) uses '%a %d %B %Y 
%H:%M:%S %Z' => '%b' vs '%B'.

_strptime.LocalTime.__calc_date_time() uses strftime('%c') and then parse the 
output to get the complete format. But it uses strftime('%c') with the march 
month, and in french, march is formatted 'mars' for both month formats (%b 
*and* %B).

_strptime.LocalTime.__calc_date_time() should detect that the month has the 
same format with %b and %B, and try other timestamps (other months).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8957>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to