1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-25 17:57:42 +03:00

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 <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-10-02 13:57:43 +13:00 committed by Andrew Bartlett
parent 7c89c5880e
commit 08dbb35e7e

View File

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