From 6d51473a73c331ba050eb48893f5fd3a3e30a105 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 20 Dec 2018 16:34:21 +0000 Subject: [PATCH] Compare .date() when checking days between datetimes (badges.py) --- modules/badges.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/badges.py b/modules/badges.py index ab12bbd7..815761c2 100644 --- a/modules/badges.py +++ b/modules/badges.py @@ -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", {})