Use 'timezone.localtime()' when calculating the next run time (#520)

Signed-off-by: weiyang <weiyang.ones@gmail.com>
This commit is contained in:
weiyang
2021-03-21 12:02:22 +01:00
committed by GitHub
parent 840813828a
commit 1869a94118
+1 -1
View File
@@ -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