From 263582f48c4a61f685e155c805054b6a9882fcd4 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Wed, 1 Aug 2012 02:08:20 -0400 Subject: [PATCH] int(timedelta.total_seconds()) --- earwigbot/tasks/drn_clerkbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/earwigbot/tasks/drn_clerkbot.py b/earwigbot/tasks/drn_clerkbot.py index f09a722..1479272 100644 --- a/earwigbot/tasks/drn_clerkbot.py +++ b/earwigbot/tasks/drn_clerkbot.py @@ -596,7 +596,7 @@ class DRNClerkBot(Task): def format_time_since(self, dt): parts = [("year", 31536000), ("day", 86400), ("hour", 3600)] - seconds = (datetime.utcnow() - dt).total_seconds() + seconds = int((datetime.utcnow() - dt).total_seconds()) msg = [] for name, size in parts: num = seconds // size