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:

Animal Welfare and Capabilitarianism

All ethics is a special case of animal welfare science

via Thing of Things December 18, 2024

Developing the middle ground on polarized topics

Avoiding false dichotomies The post Developing the middle ground on polarized topics appeared first on Otherwise.

via Otherwise November 25, 2024

How to eat vegan on Icon of the Seas

Royal Caribbean has a new giant cruise ship, Icon of the Seas, which has a large selection of food options.

via Home November 21, 2024

more     (via openring)