def parse_datetime():
    date1, time1 = '2012-09-08', '12:23:33'
date2, time2 = '2012-09-08', '12:23:33'
dt1 = datetime.datetime.strptime(date1 + ' ' + time1, '%Y-%m-%d %H:%M:%S')
dt2 = datetime.datetime.strptime(date2 + ' ' + time2, '%Y-%m-%d %H:%M:%S')
(dt1 - dt2).total_seconds()

def parse_time():
    d1 = time.strptime(date1 + ' ' + time1, '%Y-%m-%d %H:%M:%S')
d2 = time.strptime(date2 + ' ' + time2, '%Y-%m-%d %H:%M:%S')
seconds1 = time.mktime(d1)
seconds2 = time.mktime(d2)
what's the fastest way of converting a string time stamp into epoch time with python?