4 messages in org.python.python-bugs-list[ python-Bugs-898253 ] strftime ignor...
FromSent OnAttachments
SourceForge.netMar 13, 2004 8:17 pm 
SourceForge.netMar 14, 2004 1:03 am 
SourceForge.netMar 14, 2004 1:18 am 
SourceForge.netMar 14, 2004 4:58 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[ python-Bugs-898253 ] strftime ignores date format on winxpActions...
From:SourceForge.net (nore@sourceforge.net)
Date:Mar 13, 2004 8:17:14 pm
List:org.python.python-bugs-list

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: Brett Cannon (bcannon) Date: 2004-02-17 16:50

Message: Logged In: YES user_id=357491

This is a Windows C library bug and nothing to do with our end. Since time.strftime is just a wrapper around ISO C's strftime function we just pass in the arguments and then pass them back out without fiddling with anything.

So unless there is some compiler setting that needs to be set to be more locale-sensitive (doubt it, but since I don't have a Windows box I have no way of knowing; this is why I am unassigning this from myself) this is probably invalid and Microsoft's fault.

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

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

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