Browse Source

int(timedelta.total_seconds())

tags/v0.1^2
Ben Kurtovic 12 years ago
parent
commit
263582f48c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      earwigbot/tasks/drn_clerkbot.py

+ 1
- 1
earwigbot/tasks/drn_clerkbot.py View File

@@ -596,7 +596,7 @@ class DRNClerkBot(Task):


def format_time_since(self, dt): def format_time_since(self, dt):
parts = [("year", 31536000), ("day", 86400), ("hour", 3600)] parts = [("year", 31536000), ("day", 86400), ("hour", 3600)]
seconds = (datetime.utcnow() - dt).total_seconds()
seconds = int((datetime.utcnow() - dt).total_seconds())
msg = [] msg = []
for name, size in parts: for name, size in parts:
num = seconds // size num = seconds // size


Loading…
Cancel
Save