time.mktime bug in 2.0?

Steve Holden sholden at holdenweb.com
Wed Jan 3 11:35:43 EST 2001


<wmiller34 at my-deja.com> wrote in message news:92vi86$7cp$1 at nnrp1.deja.com...
> I'm getting this "TypeError" when I use mktime in 2.0.  It works in
> 1.52.  Any ideas?
>
> >>> import time
> >>> t = time.mktime(1999,12,21,0,0,0,0,0,0)
> Traceback (innermost last):
>   File "<interactive input>", line 1, in ?
> TypeError: mktime requires exactly 1 argument; 9 given
>
>
> -Walter

Are you sure you aren't missing an extra set of parentheses?  The
documentation says time.mktime should take a 9-tuple as its argument:

>>> import time
>>> time.mktime((1999,12,21,0,0,0,0,0,0))
945752400.0
>>>

I don't have my 1.5.2 handy to check what actually happened with that.

regards
 Steve







More information about the Python-list mailing list