Hey Chris,
Chris Rebert wrote:
def timestamp(dttm):
return time.mktime(dttm.timetuple())
from calendar import timegm
def timestamp(dttm):
return timegm(dttm.utctimetuple())
#the *utc*timetuple change is just for extra consistency
#it shouldn't actually make a difference here
Ah, right. What on earth is timegm doing in calendar?
No way I ever would have thought to look there...
I wonder what the best way to get this stuff documented in the datetime
modules docs is?
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--
http://mail.python.org/mailman/listinfo/python-list