This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients belopolsky, eli.bendersky, ezio.melotti, rpetrov, vstinner
Date 2011-01-12.10:54:54
SpamBayes Score 7.284641e-06
Marked as misclassified No
Message-id <1294829699.13.0.893913339412.issue8957@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2011-01-12 10:54:59vstinnersetrecipients: + vstinner, belopolsky, ezio.melotti, rpetrov, eli.bendersky
2011-01-12 10:54:59vstinnersetmessageid: <1294829699.13.0.893913339412.issue8957@psf.upfronthosting.co.za>
2011-01-12 10:54:54vstinnerlinkissue8957 messages
2011-01-12 10:54:54vstinnercreate