Message107413
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. |
|
Date |
User |
Action |
Args |
2010-06-09 20:24:41 | belopolsky | set | recipients:
+ belopolsky |
2010-06-09 20:24:40 | belopolsky | set | messageid: <1276115080.37.0.388300880324.issue8957@psf.upfronthosting.co.za> |
2010-06-09 20:24:38 | belopolsky | link | issue8957 messages |
2010-06-09 20:24:38 | belopolsky | create | |
|