diff options
author | Dan McGee <dan@archlinux.org> | 2012-07-24 16:19:48 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-07-25 02:57:20 +0200 |
commit | c0bf9e20660cfae7ea8994472555bba23398b598 (patch) | |
tree | 889351fc02d4930233acf3dace3ececda4833c88 /releng/management | |
parent | 61b4098c611592d62b40a9ee941976a869dff4fc (diff) | |
download | archweb-c0bf9e20660cfae7ea8994472555bba23398b598.tar.gz archweb-c0bf9e20660cfae7ea8994472555bba23398b598.tar.xz |
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 'releng/management')
-rw-r--r-- | releng/management/commands/syncisos.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/releng/management/commands/syncisos.py b/releng/management/commands/syncisos.py index 62f005f..223c771 100644 --- a/releng/management/commands/syncisos.py +++ b/releng/management/commands/syncisos.py @@ -4,8 +4,8 @@ from HTMLParser import HTMLParser, HTMLParseError from django.conf import settings from django.core.management.base import BaseCommand, CommandError +from django.utils.timezone import now -from main.utils import utc_now from releng.models import Iso @@ -54,9 +54,8 @@ class Command(BaseCommand): existing.active = True existing.removed = None existing.save() - now = utc_now() # and then mark all other names as no longer active Iso.objects.filter(active=True).exclude(name__in=active_isos).update( - active=False, removed=now) + active=False, removed=now()) # vim: set ts=4 sw=4 et: |