summaryrefslogtreecommitdiffstats
path: root/openstack/common
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-06-12 22:07:28 +0000
committerGerrit Code Review <review@openstack.org>2012-06-12 22:07:28 +0000
commitdee31e4510b5cea39616d35dac3b0d24f93c1bfb (patch)
treee5dc773688e0effc71deff3c5342861db936fd17 /openstack/common
parent2d4e7b3177f658a2437297f9495211d0075480b0 (diff)
parentbe86feba38250988ca9d0c026e29708503f9e189 (diff)
downloadoslo-dee31e4510b5cea39616d35dac3b0d24f93c1bfb.tar.gz
oslo-dee31e4510b5cea39616d35dac3b0d24f93c1bfb.tar.xz
oslo-dee31e4510b5cea39616d35dac3b0d24f93c1bfb.zip
Merge "Fix utcnow_ts to return UTC timestamp"
Diffstat (limited to 'openstack/common')
-rw-r--r--openstack/common/timeutils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/openstack/common/timeutils.py b/openstack/common/timeutils.py
index a7b2ce3..5eeaf70 100644
--- a/openstack/common/timeutils.py
+++ b/openstack/common/timeutils.py
@@ -19,6 +19,7 @@
Time related utilities and helper functions.
"""
+import calendar
import datetime
import time
@@ -74,7 +75,7 @@ def is_older_than(before, seconds):
def utcnow_ts():
"""Timestamp version of our utcnow function."""
- return time.mktime(utcnow().timetuple())
+ return calendar.timegm(utcnow().timetuple())
def utcnow():