mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 16:12:51 +11:00
Add support to tzinfo
This commit is contained in:
parent
f7e954491c
commit
29808ba4eb
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
import datetime
|
||||
import sys
|
||||
from optparse import make_option
|
||||
from django.core.management.base import LabelCommand
|
||||
from django.utils import timezone
|
||||
from dpaste.models import Snippet
|
||||
|
||||
class Command(LabelCommand):
|
||||
|
@ -15,7 +15,7 @@ class Command(LabelCommand):
|
|||
deleteable_snippets = Snippet.objects.filter(
|
||||
expires__isnull=False,
|
||||
expire_type=Snippet.EXPIRE_TIME,
|
||||
expires__lte=datetime.datetime.now()
|
||||
expires__lte=timezone.now()
|
||||
)
|
||||
sys.stdout.write(u"%s snippets gets deleted:\n" % deleteable_snippets.count())
|
||||
for d in deleteable_snippets:
|
||||
|
|
Loading…
Reference in a new issue