From 08dbb35e7e460de95e77c2c2f255f155b02c57e0 Mon Sep 17 00:00:00 2001 From: Joseph Sutton Date: Mon, 2 Oct 2023 13:57:43 +1300 Subject: [PATCH] python:subunit: Use now() instead of utcnow() utcnow() is deprecated and will be removed in a future version of Python. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- python/samba/subunit/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/samba/subunit/run.py b/python/samba/subunit/run.py index 7881db448a8..4cf42b05eaf 100755 --- a/python/samba/subunit/run.py +++ b/python/samba/subunit/run.py @@ -436,7 +436,7 @@ class AutoTimingTestResultDecorator(HookedTestResultDecorator): time = self._time if time is not None: return - time = datetime.datetime.utcnow().replace(tzinfo=datetime.timezone.utc) + time = datetime.datetime.now(tz=datetime.timezone.utc) self.decorated.time(time) @property -- 2.47.3