From 849282175c38ec419fc037b1698cb4de4efdb833 Mon Sep 17 00:00:00 2001 From: Todd Willey Date: Fri, 25 Jun 2010 18:55:14 -0400 Subject: Admin API + Worker Tracking. --- nova/utils.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'nova/utils.py') diff --git a/nova/utils.py b/nova/utils.py index 325b062ee..e445a8bc4 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -29,6 +29,7 @@ import os.path import inspect import subprocess import random +import time from nova import flags @@ -114,3 +115,8 @@ def get_my_ip(): (addr, port) = csock.getsockname() csock.close() return addr + +def timestamp(at=None): + if not at: + at = time.gmtime() + return time.strftime("%Y-%m-%dT%H:%M:%SZ", at) -- cgit