use now() from django.utils.timezone - it is utc and not naive
This commit is contained in:
parent
724f35225e
commit
a210936dcf
@ -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):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user