From: Joseph Sutton Date: Mon, 2 Oct 2023 00:58:18 +0000 (+1300) Subject: selftest: Use now() instead of utcnow() X-Git-Tag: tevent-0.16.0~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3f70da665bd7e4946cc5e777c52fdaa1954119d3;p=thirdparty%2Fsamba.git selftest: 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/selftest/subunithelper.py b/selftest/subunithelper.py index 6e16a276836..490e7785523 100644 --- a/selftest/subunithelper.py +++ b/selftest/subunithelper.py @@ -483,7 +483,7 @@ class PerfFilterOps(unittest.TestResult): def get_time(self): if self.suite_has_time: return self.latest_time - return datetime.datetime.utcnow() + return datetime.datetime.now(tz=datetime.timezone.utc) def startTest(self, test): self.seen_output = True