added missing isotime method from utils

This commit is contained in:
Vishvananda Ishaya 2010-07-08 10:53:27 -07:00
parent 2c69755f05
commit c2657e705b

@ -22,13 +22,14 @@
System-level utilities and helper functions.
"""
import logging
import socket
import sys
import os.path
import datetime
import inspect
import subprocess
import logging
import os.path
import random
import socket
import subprocess
import sys
from nova import flags
@ -114,3 +115,8 @@ def get_my_ip():
(addr, port) = csock.getsockname()
csock.close()
return addr
def isotime(at=None):
if not at:
at = datetime.utcnow()
return at.strftime("%Y-%m-%dT%H:%M:%SZ")