Red Hat Bugzilla – Bug 838647
with LANG=zh_CN.utf set, datetime.datetime.strptime('%x', time.strftime('%x')) fails
Last modified: 2016-08-03 17:44:45 EDT
Description of problem:
if LANG is set to zh_CN.UTF8, the python code like:
os.environ['LANG'] = "zh_CN.utf8"
print datetime.datetime.strptime('%x', time.strftime('%x'))
ie, trying to parse the localized date format with strptime
fails even when using the same format ('%x')
I suspect this might be related to
https://bugzilla.redhat.com/show_bug.cgi?id=785984, though trying:
LANG=zh_CN.utf8 date --date="$(date +'%x' -d '10/11/2011') " "+%x"
Seems to work okay.
[adrian@dhcp231-28 ~]$ rpm -q python glibc-common
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
I'm linking upstream bug that tries to address this, currently without a viable solution, I think.
Since upstream still hasn't agreed on solution and this has a potential of behaviour change, I'm moving this bug to 6.8.