Skip to content

Commit

Permalink
Compare next_date to start_date, not previous_fire_time
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Jan 15, 2018
1 parent 295d827 commit aa6a30a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apscheduler/triggers/cron/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ def get_next_fire_time(self, previous_fire_time, now):
# Skip this field value
next_date, fieldnum = self._increment_field_value(next_date, fieldnum)
except AmbiguousTimeError:
# Try this datetime with DST set unless it's earlier than
# previous_run_time, in which case don't set DST
# Try this datetime with DST set unless it's earlier than start_date,
# in which case don't set DST
next_date = self._set_field_value(next_date, fieldnum, next_value,
is_dst=True)
if previous_fire_time and next_date <= previous_fire_time:
if next_date < start_date:
next_date = self._set_field_value(next_date, fieldnum, next_value,
is_dst=False)
fieldnum += 1
Expand Down

0 comments on commit aa6a30a

Please sign in to comment.