diff options
author | Alex Grönholm <alex.gronholm@nextday.fi> | 2018-01-05 12:38:02 +0200 |
---|---|---|
committer | Alex Grönholm <alex.gronholm@nextday.fi> | 2018-01-16 00:39:40 +0200 |
commit | aa6a30a219e4b9ef217eba59b0bb5098981efc66 (patch) | |
tree | 70c93e24b1c57bf6ef69995b308ae23550c89135 | |
parent | 295d82781fc88bd65a14f8fb0a47ab168b8bcdaa (diff) | |
download | apscheduler-aa6a30a219e4b9ef217eba59b0bb5098981efc66.tar.gz |
Compare next_date to start_date, not previous_fire_timev3.5.1
-rw-r--r-- | apscheduler/triggers/cron/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apscheduler/triggers/cron/__init__.py b/apscheduler/triggers/cron/__init__.py index c3e40fc..6bcfb27 100644 --- a/apscheduler/triggers/cron/__init__.py +++ b/apscheduler/triggers/cron/__init__.py @@ -187,11 +187,11 @@ class CronTrigger(BaseTrigger): # 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 |