summaryrefslogtreecommitdiff
path: root/packages/management/commands
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-07-24 09:19:48 -0500
committerDan McGee <dan@archlinux.org>2012-07-24 19:57:20 -0500
commitc0bf9e20660cfae7ea8994472555bba23398b598 (patch)
tree889351fc02d4930233acf3dace3ececda4833c88 /packages/management/commands
parent61b4098c611592d62b40a9ee941976a869dff4fc (diff)
Remove custom utc_now() function, use django.utils.timezone.now()
This was around from the time when we handled timezones sanely and Django did not; now that we are on 1.4 we no longer need our own code to handle this. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages/management/commands')
-rw-r--r--packages/management/commands/signoff_report.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/management/commands/signoff_report.py b/packages/management/commands/signoff_report.py
index ddf930db..72fcbe1e 100644
--- a/packages/management/commands/signoff_report.py
+++ b/packages/management/commands/signoff_report.py
@@ -15,6 +15,7 @@ from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.db.models import Count
from django.template import loader, Context
+from django.utils.timezone import now
from collections import namedtuple
from datetime import timedelta
@@ -23,7 +24,6 @@ from operator import attrgetter
import sys
from main.models import Repo
-from main.utils import utc_now
from packages.models import Signoff
from packages.utils import get_signoff_groups
@@ -66,9 +66,9 @@ def generate_report(email, repo_name):
new_hours = 24
old_days = 14
- now = utc_now()
- new_cutoff = now - timedelta(hours=new_hours)
- old_cutoff = now - timedelta(days=old_days)
+ current_time = now()
+ new_cutoff = current_time - timedelta(hours=new_hours)
+ old_cutoff = current_time - timedelta(days=old_days)
if len(signoff_groups) == 0:
# no need to send an email at all