diff options
| author | Todd Willey <todd@rubidine.com> | 2010-06-25 18:55:14 -0400 |
|---|---|---|
| committer | Todd Willey <todd@rubidine.com> | 2010-06-25 18:55:14 -0400 |
| commit | 849282175c38ec419fc037b1698cb4de4efdb833 (patch) | |
| tree | 0deab000fe0a95e05df55d3392a5169aa35cbe3b /nova/utils.py | |
| parent | 8a2f1763cbadd47f6ce26467ac9f82bc9b436d2a (diff) | |
| download | nova-849282175c38ec419fc037b1698cb4de4efdb833.tar.gz nova-849282175c38ec419fc037b1698cb4de4efdb833.tar.xz nova-849282175c38ec419fc037b1698cb4de4efdb833.zip | |
Admin API + Worker Tracking.
Diffstat (limited to 'nova/utils.py')
| -rw-r--r-- | nova/utils.py | 6 |
1 files changed, 6 insertions, 0 deletions
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) |
