• + 0 comments
    import os
    from datetime import datetime as dt
    def time_delta(t1, t2):
        fmt = "%a %d %b %Y %H:%M:%S %z"
        deltaSeconds = abs((dt.strptime(t1, fmt)- dt.strptime(t2, fmt)).total_seconds())
        return str(int(deltaSeconds))
    if __name__ == '__main__':
        with open(os.environ['OUTPUT_PATH'], 'w') as fptr:
            for t_itr in range(int(input())):
                t1 = input()
                t2 = input()
                fptr.write(time_delta(t1, t2) + '\n')