diff --git a/requirements.txt b/requirements.txt index 93edec6d5b..3df4b4dbbd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -31,7 +31,7 @@ oslo.middleware>=3.31.0 # Apache-2.0 oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0 oslo.service!=1.28.1,>=1.24.0 # Apache-2.0 oslo.upgradecheck>=1.3.0 # Apache-2.0 -oslo.utils>=3.40.0 # Apache-2.0 +oslo.utils>=7.0.0 # Apache-2.0 oslo.concurrency>=3.26.0 # Apache-2.0 PyMySQL>=0.7.6 # MIT License stevedore>=1.20.0 # Apache-2.0 diff --git a/trove/common/timeutils.py b/trove/common/timeutils.py index 44a0b9ff32..06bea4d8ba 100644 --- a/trove/common/timeutils.py +++ b/trove/common/timeutils.py @@ -16,6 +16,7 @@ from datetime import datetime from datetime import timedelta from datetime import tzinfo +from oslo_utils import timeutils class zulutime(tzinfo): @@ -37,10 +38,10 @@ def utcnow_aware(): def utcnow(): - """A wrapper around datetime.datetime.utcnow(). We're doing this + """A wrapper around timeutils.utcnow(). We're doing this because it is mock'ed in some places. """ - return datetime.utcnow() + return timeutils.utcnow() def isotime(tm=None, subsecond=False):