Compare .date() when checking days between datetimes (badges.py)
This commit is contained in:
parent
568eff01e0
commit
6d51473a73
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ class Module(ModuleManager.BaseModule):
|
|||
return datetime.datetime.strptime(dt, DATETIME_FORMAT)
|
||||
|
||||
def _days_since(self, now: datetime.datetime, dt: datetime.datetime):
|
||||
return (now-dt).days
|
||||
return (now.date()-dt.date()).days
|
||||
|
||||
def _get_badges(self, user):
|
||||
return user.get_setting("badges", {})
|
||||
|
|
Loading…
Reference in a new issue