How to convert current date to epoch timestamp ?
Format current date:
29.08.2011 11:05:02
That should do it
import time date_time = '29.08.2011 11:05:02' pattern = '%d.%m.%Y %H:%M:%S' epoch = int(time.mktime(time.strptime(date_time, pattern))) print epoch
1.4m articles
1.4m replys
5 comments
57.0k users