Have you looked at time.mktime()? Best I can make out, that's what
you're asking for:
mktime
This is the inverse function of localtime. Its argument is the full
9-tuple (since the dst flag is needed). It returns an integer.
>>> import time
>>> time.time()
762477766.033
>>> time.localtime(time.time())
(1994, 2, 28, 18, 22, 48, 0, 59, 0)
>>> time.mktime(time.localtime(time.time()))
762477771
>>>
from-which-you-can-infer-my-typing-speed<grin>-ly y'rs - tim
Tim Peters tim@ksr.com
not speaking for Kendall Square Research Corp