Converting ISO 8061 datetimes to epoch timestamps

May 13th, 2011
python, tech
If you have something like:
2011-04-26T00:00:00Z-06
And you want to convert this into seconds since the epoch, apparently the incantation is:
int(time.mktime(dateutil.parser.parse(x).timetuple()))
This requires the dateutil module.

Recent posts on blogs I like:

Bad Therapy Review: Privilege

Gently raised in Park Slope

via Thing of Things May 7, 2024

How bad is alcohol?

Unfortunately we landed on a pretty bad drug as a default. The post How bad is alcohol? appeared first on Otherwise.

via Otherwise May 6, 2024

Clarendon Postmortem

I posted a postmortem of a community I worked to help build, Clarendon, in Cambridge MA, over at Supernuclear.

via Home March 19, 2024

more     (via openring)