Fix dayssince sometimes being off by 1 day depending on timezone (#484)

This commit is contained in:
Daniel Beard 2022-06-15 06:53:32 -07:00 committed by GitHub
parent f47fbce0cb
commit 7d7982b077
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ def dayssince(value, today=None):
:returns: the formatted string :returns: the formatted string
""" """
if today is None: if today is None:
today = timezone.datetime.now().date() today = timezone.localtime().date()
delta = today - value delta = today - value