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 belopolsky
Recipients belopolsky
Date 2010-06-09.20:24:38
SpamBayes Score 0.012022361
Marked as misclassified No
Message-id <1276115080.37.0.388300880324.issue8957@psf.upfronthosting.co.za>
In-reply-to
Content
The following code:

import locale, time
locale.setlocale(locale.LC_ALL, "fr_FR.UTF-8")
t = time.localtime()
s = time.strftime('%c', t)
time.strptime('%c', s)

Raises

ValueError: time data '%c' does not match format 'Mer  9 jui 16:14:46 2010'

in any locale where month follows day in '%c' format.  Note that attached C code works as expected on my OSX laptop.

I wonder it it would make sense to call platform strptime where available? I wonder if platform support for strptime has improved since 2002 when _strptime.py was introduced.
History
Date User Action Args
2010-06-09 20:24:41belopolskysetrecipients: + belopolsky
2010-06-09 20:24:40belopolskysetmessageid: <1276115080.37.0.388300880324.issue8957@psf.upfronthosting.co.za>
2010-06-09 20:24:38belopolskylinkissue8957 messages
2010-06-09 20:24:38belopolskycreate