time

Michele Simionato michele.simionato at gmail.com
Tue Sep 28 09:19:26 CEST 2004


Bryan <belred1 at yahoo.com> wrote in message news:<So36d.168361$3l3.52363 at attbi_s03>...
> can someone explain to me why i get different values for the tm_yday and 
> tm_isdst values?
> 
>  >>> import rfc822
>  >>> rfc822.parsedate('Mar  1 01:03:59 2004')
> (2004, 3, 1, 1, 3, 59, 0, 0, 0)
> 
>  >>> import time
>  >>> time.strptime('Mar  1 01:03:59 2004', '%b %d %H:%M:%S %Y')
> (2004, 3, 1, 1, 3, 59, 0, 61, -1)
> 
> 
> thanks,
> 
> bryan

I asked a similar question just few days ago. Here is the answer:

>>> time.strptime('Mar  1 01:03:59 2004 UTC', '%b %d %H:%M:%S %Y %Z')
(2004, 3, 1, 1, 3, 59, 0, 61, 0)

               Michele Simionato



More information about the Python-list mailing list