Skip to content

Instantly share code, notes, and snippets.

@rjshekar90
Created March 17, 2017 03:27
Show Gist options
  • Save rjshekar90/ccf861658786b54e463807073063d52d to your computer and use it in GitHub Desktop.
Save rjshekar90/ccf861658786b54e463807073063d52d to your computer and use it in GitHub Desktop.
from datetime import datetime
for _ in range(int(input())):
t1=datetime.strptime(input(),'%a %d %b %Y %H:%M:%S %z')
t2=datetime.strptime(input(),'%a %d %b %Y %H:%M:%S %z')
print (int(abs((t1-t2).total_seconds())))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment