Skip to content

Commit

Permalink
Fix dayssince sometimes being off by 1 day depending on timezone (#484)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanBeard committed Jun 15, 2022
1 parent f47fbce commit 7d7982b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/templatetags/duration.py
Expand Up @@ -103,7 +103,7 @@ def dayssince(value, today=None):
:returns: the formatted string
"""
if today is None:
today = timezone.datetime.now().date()
today = timezone.localtime().date()

delta = today - value

Expand Down

0 comments on commit 7d7982b

Please sign in to comment.