Adding unknown variables to time.mktime()

Roman Suzi rnd at onego.ru
Tue Jun 26 05:49:06 EDT 2001


On 26 Jun 2001, Gustaf Liljegren wrote:

>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.

try with all 9 integers.
RTFM time module docs.

>Regards,
>
>Gustaf Liljegren
>

Sincerely yours, Roman Suzi
-- 
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
_/ Tuesday, June 26, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ "It is better to be brief than boring." _/





More information about the Python-list mailing list