[ python-Bugs-1045381 ] strptime doesn't work with %U

SourceForge.net noreply at sourceforge.net
Wed Oct 13 03:35:21 CEST 2004


Bugs item #1045381, was opened at 2004-10-12 07:04
Message generated for change (Settings changed) made by bcannon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1045381&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Sebastien JUST (sebastienjust)
>Assigned to: Brett Cannon (bcannon)
Summary: strptime doesn't work with %U

Initial Comment:
It seems that strptime() ignores %U. 

For example when trying to get the first day of the
42th week of year 2004. Please test on the command line : 

import time
time.strftime("%Y-%m-%d",time.strptime("2004 42 1","%Y
%U %w"))

the result is 2004-01-01 and not 2004-10-11
seems that strptime() is ignoring %U indications.

Works fine on Python 2.2, bad on Python 2.3.3 , 2.3.4
and 2.4a1.
Tested on Fedora Core 2.

Thanks

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

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


More information about the Python-bugs-list mailing list