summaryrefslogtreecommitdiff
path: root/packages/views/flag.py
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/views/flag.py
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/views/flag.py')
-rw-r--r--packages/views/flag.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/views/flag.py b/packages/views/flag.py
index 7fa2d508..f3db93b3 100644
--- a/packages/views/flag.py
+++ b/packages/views/flag.py
@@ -5,12 +5,12 @@ from django.core.mail import send_mail
from django.db import transaction
from django.shortcuts import get_object_or_404, redirect
from django.template import loader, Context
+from django.utils.timezone import now
from django.views.generic.simple import direct_to_template
from django.views.decorators.cache import cache_page, never_cache
from ..models import FlagRequest
from main.models import Package
-from main.utils import utc_now
class FlagForm(forms.Form):
@@ -76,10 +76,10 @@ def flag(request, name, repo, arch):
@transaction.commit_on_success
def perform_updates():
- now = utc_now()
- pkgs.update(flag_date=now)
+ current_time = now()
+ pkgs.update(flag_date=current_time)
# store our flag request
- flag_request = FlagRequest(created=now,
+ flag_request = FlagRequest(created=current_time,
user_email=email, message=message,
ip_address=ip_addr, pkgbase=pkg.pkgbase,
version=version, repo=pkg.repo,