mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-15 13:37:56 +08:00
Use 'timezone.localtime()' when calculating the next run time (#520)
Signed-off-by: weiyang <weiyang.ones@gmail.com>
This commit is contained in:
@@ -620,7 +620,7 @@ def scheduler(broker: Broker = None):
|
||||
)
|
||||
)
|
||||
next_run = arrow.get(
|
||||
croniter(s.cron, timezone.now()).get_next()
|
||||
croniter(s.cron, timezone.localtime()).get_next()
|
||||
)
|
||||
if Conf.CATCH_UP or next_run > arrow.utcnow():
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user