>>> time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(1317393879.0))
'2011-09-30 22:44:39'
>>>
>>> time.mktime(time.strptime('2011-09-30 22:44:39', '%Y-%m-%d %H:%M:%S'))
1317393879.0
'2011-09-30 22:44:39'
>>>
>>> time.mktime(time.strptime('2011-09-30 22:44:39', '%Y-%m-%d %H:%M:%S'))
1317393879.0