summaryrefslogtreecommitdiff
path: root/test/lib/ansible_test/_internal/commands/integration/cloud/__init__.py
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2023-05-10 17:07:14 -0700
committerGitHub <noreply@github.com>2023-05-10 17:07:14 -0700
commit85644ca5e839284175ae4f03b3c78d3d6ff360a8 (patch)
tree5cd497ad811e35e72f21339ed7525796c5a93e76 /test/lib/ansible_test/_internal/commands/integration/cloud/__init__.py
parent594f37dbb406cf56667382bfc91bca84779541d9 (diff)
downloadansible-85644ca5e839284175ae4f03b3c78d3d6ff360a8.tar.gz
[stable-2.14] ansible-test - Avoid use of deprecated utcnow (#80750) (#80758)
The timestamps are only used by ansible-test, not the junit callback, so this change only impacts ansible-test. (cherry picked from commit fd341265d001d4e6545ffb2b7d154340cb1f1931)
Diffstat (limited to 'test/lib/ansible_test/_internal/commands/integration/cloud/__init__.py')
-rw-r--r--test/lib/ansible_test/_internal/commands/integration/cloud/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lib/ansible_test/_internal/commands/integration/cloud/__init__.py b/test/lib/ansible_test/_internal/commands/integration/cloud/__init__.py
index cad84a3689..eac9265a4f 100644
--- a/test/lib/ansible_test/_internal/commands/integration/cloud/__init__.py
+++ b/test/lib/ansible_test/_internal/commands/integration/cloud/__init__.py
@@ -170,7 +170,7 @@ def cloud_init(args: IntegrationConfig, targets: tuple[IntegrationTarget, ...])
if not args.explain and results:
result_name = '%s-%s.json' % (
- args.command, re.sub(r'[^0-9]', '-', str(datetime.datetime.utcnow().replace(microsecond=0))))
+ args.command, re.sub(r'[^0-9]', '-', str(datetime.datetime.now(tz=datetime.timezone.utc).replace(microsecond=0, tzinfo=None))))
data = dict(
clouds=results,