def convert_timedelta(duration):
    """
    Takes in Timedelta and converts it to days, hours, minutes and seconds
    :param duration: Timedelta Timestamp
    :return: Days, Hours, Minutes and Seconds
    """
    days, seconds = duration.days, duration.seconds
    hours = seconds // 3600
    minutes = (seconds % 3600) // 60
    seconds = (seconds % 60)

    # Make sure if negative numbers are rounded up to 0
    days = max(0, days)
    hours = max(0, hours)
    minutes = max(0, minutes)
    seconds = max(0, seconds)

    return days, hours, minutes, seconds