diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-01-23 22:02:03 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-01-23 22:02:03 +0000 |
commit | 416e92d728b351a5ffbbbf0dda4973d41b1a7947 (patch) | |
tree | 294a06323d123c9bfd1a594ae04a31a7cc28dde7 /openstack/common | |
parent | e59f763b2a4325b583a40afe29b95e41bd0e5a5e (diff) | |
parent | d3a4c8e8f466d5c7b2f5f8c076a48326e5bbaa40 (diff) | |
download | oslo-416e92d728b351a5ffbbbf0dda4973d41b1a7947.tar.gz oslo-416e92d728b351a5ffbbbf0dda4973d41b1a7947.tar.xz oslo-416e92d728b351a5ffbbbf0dda4973d41b1a7947.zip |
Merge "UTC ISO8601 from timestamp"
Diffstat (limited to 'openstack/common')
-rw-r--r-- | openstack/common/timeutils.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/openstack/common/timeutils.py b/openstack/common/timeutils.py index 572c829..5a011e8 100644 --- a/openstack/common/timeutils.py +++ b/openstack/common/timeutils.py @@ -98,6 +98,11 @@ def utcnow(): return datetime.datetime.utcnow() +def iso8601_from_timestamp(timestamp): + """Returns a iso8601 formated date from timestamp""" + return isotime(datetime.datetime.utcfromtimestamp(timestamp)) + + utcnow.override_time = None |