summaryrefslogtreecommitdiffstats
path: root/keystone/common
diff options
context:
space:
mode:
authorZhongyue Luo <lzyeval@gmail.com>2012-06-05 09:11:44 +0800
committerZhongyue Luo <lzyeval@gmail.com>2012-06-29 06:38:49 +0800
commitc79d93bfbc8a79617a6d3ef4e36fb5de55217d02 (patch)
tree1940868376325627fe4f16091d4b8e784e0c69fe /keystone/common
parent8cd73c75cec35d4df49891ee4c36102b4c8d96ff (diff)
Keystone should use openstack.common.timeutils
Implements blueprint use-common-timeutils 1. Edit openstack-common.conf and import keystone/openstack/common/timeutils.py 2. Replace datetime.utcnow with timeutils.utcnow 3. Replace utils.isotime with timeutils.isotime 4. Remove utils.isotime in common/utils.py and datetime related unittest Change-Id: I4f5a63a368fde8787a0dc0a817c940de685b9ca2
Diffstat (limited to 'keystone/common')
-rw-r--r--keystone/common/utils.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/keystone/common/utils.py b/keystone/common/utils.py
index 7f665a59..19749764 100644
--- a/keystone/common/utils.py
+++ b/keystone/common/utils.py
@@ -39,7 +39,6 @@ config.register_int('crypt_strength', default=40000)
LOG = logging.getLogger(__name__)
-ISO_TIME_FORMAT = '%Y-%m-%dT%H:%M:%SZ'
MAX_PASSWORD_LENGTH = 4096
@@ -232,16 +231,6 @@ def git(*args):
return check_output(['git'] + list(args))
-def isotime(dt_obj):
- """Format datetime object as ISO compliant string.
-
- :param dt_obj: datetime.datetime object
- :returns: string representation of datetime object
-
- """
- return dt_obj.strftime(ISO_TIME_FORMAT)
-
-
def unixtime(dt_obj):
"""Format datetime object as unix timestamp