Adding unknown variables to time.mktime()

Gustaf Liljegren gustafl at algonet.se
Tue Jun 26 05:11:00 EDT 2001


I have a problem with time.mktime():

>>> t = ('1999', '02', '12', '01', '34', '12', '', '', '-1')
>>> myTime = time.mktime(t)
Traceback (most recent call last):
  File "<pyshell#13>", line 1, in ?
    myTime = time.mktime(t)
TypeError: an integer is required

I have tried integers too, in the touple, but then there's a syntax error, 
as you can't have empty fields in the touple like that. Ideally, I'd like 
to be able to give only the 6 first values, since I've never heard of 
Julian days, and week day is not significant in this case.

Regards,

Gustaf Liljegren



More information about the Python-list mailing list