• + 0 comments

    Here's my code:

    from datetime import datetime
    def time_delta(t1, t2):
        df = '%a %d %b %Y %H:%M:%S %z'
        res = datetime.strptime(t1, df) - datetime.strptime(t2, df)
        return str(abs(int(res.total_seconds())))