dom0: return datatime value in get_start_time (#315)

This commit is contained in:
Marek Marczykowski 2011-10-01 02:54:18 +02:00
parent 7ae0c52e6d
commit 3c7f8b97cd

View File

@ -534,15 +534,17 @@ class QubesVm(object):
def get_start_time(self):
if not self.is_running():
return 0
return None
dominfo = self.get_xl_dominfo()
uuid = self.get_uuid()
start_time = xs.read('', "/vm/%s/start_time" % str(uuid))
return start_time
if start_time != '':
return datetime.datetime.fromtimestamp(float(start_time))
else:
return None
def is_outdated(self):
# Makes sense only on VM based on template