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-05 12:38:02 +0200 |
commit | c94428ef1e3cb67bc0400ae7d5ba5b8b5798e193 (patch) | |
tree | 061a1735d1df82df9bf60641f1a50b92b8abfb8b | |
parent | 3a42954950fbce33f5fd0436cecd406690732ed0 (diff) | |
download | apscheduler-c94428ef1e3cb67bc0400ae7d5ba5b8b5798e193.tar.gz |
Compare next_date to start_date, not previous_fire_time
-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 |