def manual_time_offset(values_list, time_x_offset, number_of_flights):
    """Applies a manually defined time offset to the "Time" to all time columns in the values_list"""
    if not time_x_offset:
        return values_list
    elif len(time_x_offset) != number_of_flights:
        print(
            'time_x_offset is not the same length as the number of flights. It has not been applied.'
            )
        return values_list
    else:
        pass
    for flight in range(number_of_flights):
        for sensor_index in range(len(values_list[flight])):
            for data_set_index in range(len(values_list[flight][sensor_index])
                ):
                new_time_data = []
                if values_list[flight][sensor_index][data_set_index][0
                    ] == 'Time':
                    for data_point in values_list[flight][sensor_index][
                        data_set_index][2]:
                        new_time_data.append(float(data_point) + float(
                            time_x_offset[flight]))
                    values_list[flight][sensor_index][data_set_index][2
                        ] = new_time_data
    return values_list
