shawn bright wrote: > Hello there, > > if i have a python datetime object, what is the easiest way to make it > into epoch seconds ?
impIn [1]: import datetime In [2]: now = datetime.datetime.now() In [4]: now.timetuple() Out[4]: (2007, 7, 20, 11, 56, 58, 4, 201, -1) In [5]: import calendar In [6]: calendar.timegm(now.timetuple()) Out[6]: 1184932618 Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor