How to convert current date to epoch timestamp ?
Format current date:
29.08.2011 11:05:02
if you want UTC try some of the gm functions:
gm
import time import calendar date_time = '29.08.2011 11:05:02' pattern = '%d.%m.%Y %H:%M:%S' utc_epoch = calendar.timegm(time.strptime(date_time, pattern)) print utc_epoch