I have a Python datetime object that I want to convert to unix time, or seconds/milliseconds since the 1970 epoch.
datetime
How do I do this?
You can use Delorean to travel in space and time!
import datetime import delorean dt = datetime.datetime.utcnow() delorean.Delorean(dt, timezone="UTC").epoch
http://delorean.readthedocs.org/en/latest/quickstart.html