mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-09 04:58:12 +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:
+1
-1
@@ -620,7 +620,7 @@ def scheduler(broker: Broker = None):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
next_run = arrow.get(
|
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():
|
if Conf.CATCH_UP or next_run > arrow.utcnow():
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user