date time arithmatic
Dave Pawson
dpawson at nearlynildram.co.uk
Sun Jan 5 10:19:25 EST 2003
More information about the Python-list mailing list
Sun Jan 5 10:19:25 EST 2003
- Previous message (by thread): date time arithmatic
- Next message (by thread): date time arithmatic
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Lexy Zhitenev" <zhitenev at cs.vsu.ru> wrote > > If the dates you operate on are in the Unix Epoch (1970 - 2038), you > can use "time.mktime" function. > >>>> import time >>>> def now(d, m, y): > ... return int(time.mktime(d, m, y, 0, 0, 0, 0, 0, 0) / 86400) > # 86400 - number of seconds passed since 1970/1/1. That's it... (once I changed the parameter to a tuple :-) Many thanks. DaveP.
- Previous message (by thread): date time arithmatic
- Next message (by thread): date time arithmatic
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list