From: Joseph Sutton Date: Mon, 2 Oct 2023 00:57:43 +0000 (+1300) Subject: python:subunit: Use now() instead of utcnow() X-Git-Tag: tevent-0.16.0~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=08dbb35e7e460de95e77c2c2f255f155b02c57e0;p=thirdparty%2Fsamba.git 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 --- 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