• + 0 comments

    t1 = datetime.strptime(t1, "%a %d %b %Y %H:%M:%S %z") t2 = datetime.strptime(t2, "%a %d %b %Y %H:%M:%S %z")

    if(t1>t2):
        x = abs((t1 - t2).seconds)
        y = abs((t1 - t2).days)
    else:
        x = abs((t2 - t1).seconds)
        y = abs((t2 - t1).days)
    
    return str(y*3600*24 + x)