1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-21 09:34:19 +03:00

selftest: Use now() instead of utcnow()

utcnow() is deprecated and will be removed in a future version of Python.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-10-02 13:58:18 +13:00 committed by Andrew Bartlett
parent 44958f363e
commit 3f70da665b

View File

@ -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