3 ms·
it does, but it assumes that the timestamp you are giving it is from your current timezone. compare: >>> time.mktime(datetime.datetime.now().utctimetuple()
by nikcub 15y ago
it does, but it assumes that the timestamp you are giving it is from your current timezone. compare:
>>> time.mktime(datetime.datetime.now().utctimetuple())
1310737652.0
>>> int(datetime.datetime.utcnow().strftime('%s'))
1310701659
my local timezone is +10, and mktime is adding it back in, hence why I always use strftime