chore: Update openstack.common to get latest timeutils
This is a simple update to marconi/openstack/common in order to pick up the optimized version of timeutils.utctime_ts() Change-Id: Ic37e5f271fe89085317a96c47d18ddd426529b50
This commit is contained in:
parent
7a7771b06e
commit
6579492add
@ -21,6 +21,7 @@ Time related utilities and helper functions.
|
||||
|
||||
import calendar
|
||||
import datetime
|
||||
import time
|
||||
|
||||
import iso8601
|
||||
import six
|
||||
@ -90,6 +91,11 @@ def is_newer_than(after, seconds):
|
||||
|
||||
def utcnow_ts():
|
||||
"""Timestamp version of our utcnow function."""
|
||||
if utcnow.override_time is None:
|
||||
# NOTE(kgriffs): This is several times faster
|
||||
# than going through calendar.timegm(...)
|
||||
return int(time.time())
|
||||
|
||||
return calendar.timegm(utcnow().timetuple())
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user