From fa93084df392a5781816f9b21c26e40ae3ca2477 Mon Sep 17 00:00:00 2001 From: Hidden Z Date: Mon, 15 Nov 2010 19:00:51 +0000 Subject: [PATCH] postkey/models.py: do not fill date_added automatically Django uses localtime when using auto_add_now=True, but we wants an UTC time. So, we will fill this field manually. --- pyi2phosts/postkey/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyi2phosts/postkey/models.py b/pyi2phosts/postkey/models.py index c6c4601..3741601 100644 --- a/pyi2phosts/postkey/models.py +++ b/pyi2phosts/postkey/models.py @@ -6,7 +6,7 @@ class i2phost(models.Model): # Maximum key length 616 bytes (to account for certs up to 100 bytes). b64hash = models.CharField("Base 64 hash", max_length=616) description = models.CharField("Description", max_length=4096, blank=True) - date_added = models.DateTimeField(auto_now_add=True) + date_added = models.DateTimeField(null=True, blank=True) # Last time this host was up last_seen = models.DateTimeField(null=True, blank=True) # Scheduled expiration date