def calculate_delta_time_series(times, valid_dt):
    """
       calculate_delta_time_series

    This function calculates the differences between all the elements of a timeseries and
    compares the differences with a valid time difference.

    True is returned if all the differences are valid; i.e. equal to the valid time difference argument
    False is returned if any of the difference fail to match the valid the time difference argument

    :param times: List of times
    :param valid_dt: Valid time difference, usually scalar, list of valid times supported
    :return: boolean [True for success]
    """
    return_msg = ""
    for t in range(len(times)-1):
        t_diff = times[t+1] - times[t]
        if t_diff not in valid_dt:
            return_msg = "Time difference {} is irregular or not in allowed values {}".format(t_diff, valid_dt)
            return False, return_msg

    return True, return_msg