From f5933b44df77df3818a38474d44ea5513249d9a8 Mon Sep 17 00:00:00 2001 From: Michael Elkins Date: Tue, 17 Jan 2012 05:03:53 +0000 Subject: store timestamps in UTC remove auto_add=True from DateTimeField, and make rpki.gui.app.timestamp.update() set the timestamp value instead. move external data timestamps to sidebar in route view svn path=/branches/tk161/; revision=4176 --- rpkid/rpki/gui/app/timestamp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rpkid/rpki/gui/app/timestamp.py') diff --git a/rpkid/rpki/gui/app/timestamp.py b/rpkid/rpki/gui/app/timestamp.py index c460ff86..93f1d032 100644 --- a/rpkid/rpki/gui/app/timestamp.py +++ b/rpkid/rpki/gui/app/timestamp.py @@ -15,8 +15,10 @@ # import models +from datetime import datetime def update(name): "Set the timestamp value for the given name to the current time." obj, created = models.Timestamp.objects.get_or_create(name=name) - if not created: obj.save() # force update for existing objects + obj.ts = datetime.utcnow() + obj.save() -- cgit v1.2.3