From 24f5d2407ba3fd041f0e7d8ea0231a10abb5556d Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Mon, 4 Feb 2013 21:00:17 -0500 Subject: [PATCH] Set server default create_dt to UTC time. --- xonstat/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xonstat/models.py b/xonstat/models.py index 4e3bb63..eb0a131 100644 --- a/xonstat/models.py +++ b/xonstat/models.py @@ -4,6 +4,7 @@ import math import sqlalchemy import sqlalchemy.sql.functions as sfunc from calendar import timegm +from datetime import datetime as dt from datetime import timedelta from sqlalchemy.orm import mapper from sqlalchemy.orm import scoped_session @@ -67,6 +68,7 @@ class Server(object): self.name = name self.hashkey = hashkey self.ip_addr = ip_addr + self.create_dt = dt.utcnow() def __repr__(self): return "" % (self.server_id, self.name.encode('utf-8')) -- 2.39.2