Strptime Issues

Andy Wilson andywil at nortelnetworks.com
Wed Sep 15 14:13:20 EDT 2004


Something like this...

>             print list_dir[j]
>             print "%s" % (time.strptime (list_dir[j], '%Y%U%w'))
>             ttuple = time.strptime (list_dir[j], '%Y%U%w')
>             year   = ttuple[0]
>             month  = ttuple[1]
>             day    = ttuple[2]
>             print day, month, year
>
> I get the following output:
>
> 2004123
> (2004, 1, 1, 0, 0, 0, 2, 1, -1)
> 1 1 2004
>
> 2004124
> (2004, 1, 1, 0, 0, 0, 3, 1, -1)
> 1 1 2004 
________________________________

From: Batista, Facundo [mailto:FBatista at uniFON.com.ar] 
Sent: 15 September 2004 15:15
To: Wilson, Andy [IRE07:CM41:EXCH]
Subject: RE: Strptime Issues


Could you please submit to the list a piece of code that represents this
problem?
 
Thank you.



Facundo Batista 
Desarrollo de Red 
fbatista at unifon.com.ar 
(54 11) 5130-4643 
Cel: 15 5097 5024 

 

	-----Mensaje original-----
	De: Andy Wilson [mailto:andywil at nortelnetworks.com]
	Enviado el: Miércoles, 15 de Septiembre de 2004 11:12
	Para: python-list at python.org
	Asunto: Strptime Issues
	
	
		Hi,
	 
	I have found some issues with the _strptime.py module in release
2.3.4, I was wondering if these are being addressed or someone can give me
any assistance.
	 
	1. I have code that uses a time string format of %Y%U%w, where %U is
week number and %w is day of the week. In release 2.3.x this appears broken.
Earlier code using python 1.5.2 works OK. See this link for more info
	 
	
http://groups.google.com/groups?q=strptime+bug+glawster&hl=en&lr=&ie=UTF-8&g
roup=comp.lang.python.*&selm=2e3b9aea.0406110245.32b59c14%40posting.google.c
om&rnum=1
	 
	2. In using Freeze to build a Solaris executable I get a "no module
strptime" error. The module has not been statically linked into the
executable (as far as I can tell); are there any issues around timemodule.c
and strptime? I have had to do some changes to Modules/Setup in the
distribution to get other modules "linked" but am at a loss for this one.
	 
	Regards,
	Andy Wilson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20040915/d1a77b19/attachment.html>


More information about the Python-list mailing list