def GetMatch(self, start):





    start_time = _ToTimeZone(start, self.timezone).replace(tzinfo=None)
    if self.months:

      months = self._NextMonthGenerator(start_time.month, self.months)
    while True:

      month, yearwraps = months.next()
      candidate_month = start_time.replace(day=1, month=month,
                                           year=start_time.year + yearwraps)


      day_matches = self._MatchingDays(candidate_month.year, month)

      if ((candidate_month.year, candidate_month.month)
          == (start_time.year, start_time.month)):

        day_matches = [x for x in day_matches if x >= start_time.day]

        while (day_matches and day_matches[0] == start_time.day
               and start_time.time() >= self.time):
          day_matches.pop(0)
      while day_matches:

        out = candidate_month.replace(day=day_matches[0], hour=self.time.hour,
                                      minute=self.time.minute, second=0,
                                      microsecond=0)

        if self.timezone and pytz is not None:









          try:
            out = self.timezone.localize(out, is_dst=None)
          except AmbiguousTimeError:

            out = self.timezone.localize(out)
          except NonExistentTimeError:






            for _ in range(24):


              out += datetime.timedelta(minutes=60)
              try:
                out = self.timezone.localize(out)
              except NonExistentTimeError:

                continue
              break
        return _ToTimeZone(out, start.tzinfo)
Returns the next match after time start.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/cron/groctimespecification.py/SpecificTimeSpecification.GetMatch