Simon Willison’s Weblog

Subscribe

1 item tagged “unixtimestamp”

2007

calendar.timegm() (via) An “unrelated but handy function” that converts a time.gmtime() in to a corresponding Unix timestamp. I’ve been hand-rolling this one for years; never thought to look in calendar.

# 3rd September 2007, 1:54 am / calendar, datetime, python, sam-ruby, time, timezones, unixtimestamp