diff options
author | Michael Elkins <melkins@tislabs.com> | 2012-01-17 05:03:53 +0000 |
---|---|---|
committer | Michael Elkins <melkins@tislabs.com> | 2012-01-17 05:03:53 +0000 |
commit | f5933b44df77df3818a38474d44ea5513249d9a8 (patch) | |
tree | 96d924297b4064f76ea7bf8dadd35b08d036a336 /rpkid/rpki/gui/app/timestamp.py | |
parent | 3f82521d0f8dd5c5e1170ebc8d52e6f03735cab5 (diff) |
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
Diffstat (limited to 'rpkid/rpki/gui/app/timestamp.py')
-rw-r--r-- | rpkid/rpki/gui/app/timestamp.py | 4 |
1 files changed, 3 insertions, 1 deletions
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() |