Stefan Krah <[email protected]> added the comment:
It looks like test_locale from test_format.py changes the locale on Windows:
>>> import time
>>> >>> magic_date = (1999, 3, 17, 22, 44, 55, 2, 76, 0)
>>> >>> time.strftime("%c",
>>> magic_date)
'03/17/99 22:44:55'
>>> import locale
>>> locale.getdefaultlocale()
('en_US', 'cp1252')
>>> time.strftime("%c", magic_date)
'03/17/99 22:44:55'
>>> oldloc = locale.setlocale(locale.LC_ALL, '')
>>> oldloc
'English_United States.1252'
>>> time.strftime("%c", magic_date)
>>> '3/17/1999 10:44:55 PM'
>>> locale.setlocale(locale.LC_ALL, oldloc)
'English_United States.1252'
>>> time.strftime("%c", magic_date)
>>> '3/17/1999 10:44:55 PM'
----------
nosy: +skrah
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue14113>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com