You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
854 B
27 lines
854 B
From 82fd2b26deb3dd04d08576415622f017527ba072 Mon Sep 17 00:00:00 2001
|
|
From: Sergey Cherevko <s.cherevko@msvsphere-os.ru>
|
|
Date: Wed, 22 Jan 2025 16:23:32 +0300
|
|
Subject: [PATCH 2/2] Using timezone-aware objects to represent datetimes in
|
|
UTC
|
|
|
|
---
|
|
salt/grains/core.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/salt/grains/core.py b/salt/grains/core.py
|
|
index bbd3830..42f5ef5 100644
|
|
--- a/salt/grains/core.py
|
|
+++ b/salt/grains/core.py
|
|
@@ -2904,7 +2904,7 @@ def ip_fqdn():
|
|
if not ret["ipv" + ipv_num]:
|
|
ret[key] = []
|
|
else:
|
|
- start_time = datetime.datetime.utcnow()
|
|
+ start_time = datetime.datetime.now(datetime.UTC)
|
|
try:
|
|
info = socket.getaddrinfo(_fqdn, None, socket_type)
|
|
ret[key] = list({item[4][0] for item in info})
|
|
--
|
|
2.43.5
|
|
|