From 1869a941183d1d90613212a5579df161b48b2a39 Mon Sep 17 00:00:00 2001 From: weiyang Date: Sun, 21 Mar 2021 19:02:22 +0800 Subject: [PATCH] Use 'timezone.localtime()' when calculating the next run time (#520) Signed-off-by: weiyang --- django_q/cluster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_q/cluster.py b/django_q/cluster.py index cc5cbff..503ef71 100644 --- a/django_q/cluster.py +++ b/django_q/cluster.py @@ -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