[ python-Bugs-898253 ] strftime ignores date format on winxp

SourceForge.net noreply at sourceforge.net
Mon Feb 16 16:19:37 EST 2004


Bugs item #898253, was opened at 2004-02-16 15:19
Message generated for change (Settings changed) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=898253&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Matthew Sherborne (matiu)
>Assigned to: Brett Cannon (bcannon)
Summary: strftime ignores date format on winxp

Initial Comment:
On Windows XP in the control panel set your country to
"New Zealand".

This gives a short date format of 'dd-mm-yy'

Now in python:
>>> from time import *
>>> print strftime('%c', localtime)
02/17/04 09:15:10
>>> print strftime('%x', localtime())
02/17/04

This is giving the date in the format 'mm-dd-yy'
(American).

Could it be to do with the 'locale.nl_langinfo' bieng
unavailable in xp?

Versions:
ActivePython 2.3.2 Build 232 (ActiveState Corp.) based
on Python 2.3.2 (#49, Nov 13 2003, 10:34:54) [MSC
v.1200 32 bit (Intel)] on win32
Windows XP Home Edition (up to dateish)

----------------------------------------------------------------------

Comment By: Matthew Sherborne (matiu)
Date: 2004-02-16 15:29

Message:
Logged In: YES 
user_id=304464

Sorry, code should be:

>>> from time import *
>>> print strftime('%c', localtime())
02/17/04 09:15:10
>>> print strftime('%x', localtime())
02/17/04

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=898253&group_id=5470



More information about the Python-bugs-list mailing list