You are viewing a single comment's thread. Return to all comments →
from datetime import datetime date_format = "%a %d %b %Y %H:%M:%S %z" def time_delta(t1, t2): d1 = datetime.strptime(t1, date_format) d2 = datetime.strptime(t2, date_format) if d2 < d1: return str(int((d1 - d2).total_seconds())) else : return str(int((d2 - d1).total_seconds()))
Seems like cookies are disabled on this browser, please enable them to open this website
Time Delta
You are viewing a single comment's thread. Return to all comments →