From eb2af29453a91281c3a7855813d73aab9df0cfc1 Mon Sep 17 00:00:00 2001 From: Mohammad Hamdy Date: Fri, 17 Dec 2021 07:14:28 +0200 Subject: [PATCH] Fix ClockedSchedule and PeriodicTasks showing UTC time when Time Zone is enabled. (#464) * Fix ClockedSchedule showing UTC time and ignoring Timezone * Force datatime to have timezone information * Force datatime to have timezone information-removing unused import Co-authored-by: Mohamed Hamdy --- django_celery_beat/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_celery_beat/models.py b/django_celery_beat/models.py index 583d8b63..b8bef6d1 100644 --- a/django_celery_beat/models.py +++ b/django_celery_beat/models.py @@ -220,7 +220,7 @@ class Meta: ordering = ['clocked_time'] def __str__(self): - return '{}'.format(self.clocked_time) + return '{}'.format(make_aware(self.clocked_time)) @property def schedule(self):