use now() from django.utils.timezone - it is utc and not naive

This commit is contained in:
Thomas Waldmann 2013-10-27 07:29:58 +01:00
parent 724f35225e
commit a210936dcf

View File

@ -1,5 +1,5 @@
import re import re
from datetime import datetime from django.utils.timezone import now
import dns.resolver import dns.resolver
@ -118,7 +118,7 @@ class Host(models.Model):
return 'error' return 'error'
def poke(self): def poke(self):
self.last_api_update = datetime.now() self.last_api_update = now()
self.save() self.save()
def generate_secret(self): def generate_secret(self):