code: def get_next_valid_time_from_t(self, timestamp):
          
          if self.is_time_valid(timestamp):
              return timestamp
  
          # First we search for the day of t
          t_day = self.get_next_valid_day(timestamp)
          if t_day is None:
              return t_day
  
          # We search for the min of all tr.start > sec_from_morning
          # if it's the next day, use a start of the day search for timerange
          if timestamp < t_day:
              sec_from_morning = self.get_next_future_timerange_valid(t_day)
          else:  # it is in this day, so look from t (can be in the evening or so)
              sec_from_morning = self.get_next_future_timerange_valid(timestamp)
  
          if sec_from_morning is not None:
              if t_day is not None and sec_from_morning is not None:
                  return t_day + sec_from_morning
  
          # Then we search for the next day of t
          # The sec will be the min of the day
          timestamp = get_day(timestamp) + 86400
          t_day2 = self.get_next_valid_day(timestamp)
          sec_from_morning = self.get_next_future_timerange_valid(t_day2)
          if t_day2 is not None and sec_from_morning is not None:
              return t_day2 + sec_from_morning
  
          # I did not found any valid time
          return None
docs: Get next valid time for time range
  
          :param timestamp: time we compute from
          :type timestamp: int
          :return: timestamp of the next valid time (LOCAL TIME)
          :rtype: int | None