Utils: fix usage of strtime
As oslo_utils.timeutils.strtime() is deprecated in version '1.6', and will be removed in a future version. For more informations: https://docs.openstack.org/oslo.utils/latest/reference/timeutils.html Change-Id: I1aca257fbe8b08c3478c5da9639835033b19144a Partial-Bug: #1715325
This commit is contained in:
@@ -15,8 +15,6 @@ from oslo_log import log as logging
|
||||
from oslo_utils import timeutils
|
||||
import six
|
||||
|
||||
from watcher.common import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -102,7 +100,7 @@ class RequestContext(context.RequestContext):
|
||||
'domain_name': getattr(self, 'domain_name', None),
|
||||
'auth_token_info': getattr(self, 'auth_token_info', None),
|
||||
'is_admin': getattr(self, 'is_admin', None),
|
||||
'timestamp': utils.strtime(self.timestamp) if hasattr(
|
||||
'timestamp': self.timestamp.isoformat() if hasattr(
|
||||
self, 'timestamp') else None,
|
||||
'request_id': getattr(self, 'request_id', None),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user