mirror of https://github.com/snachodog/mybuddy.git
Fix dayssince sometimes being off by 1 day depending on timezone (#484)
This commit is contained in:
parent
f47fbce0cb
commit
7d7982b077
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue