Skip to content

Commit

Permalink
Fix ClockedSchedule and PeriodicTasks showing UTC time when Time Zone…
Browse files Browse the repository at this point in the history
… 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 <[email protected]>
  • Loading branch information
moreaba and Mohamed Hamdy authored Dec 17, 2021
1 parent 77a6ccf commit eb2af29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_celery_beat/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit eb2af29

Please sign in to comment.