From: Jo Sutton Date: Mon, 4 Mar 2024 23:31:27 +0000 (+1300) Subject: python: Correctly qualify strptime() X-Git-Tag: tdb-1.4.11~1390 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd7b0720de7b85903c5d4dfb74fb66bd29519f1d;p=thirdparty%2Fsamba.git python: Correctly qualify strptime() Signed-off-by: Jo Sutton Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/nt_time.py b/python/samba/nt_time.py index 496dde576b4..559ff7ca0da 100644 --- a/python/samba/nt_time.py +++ b/python/samba/nt_time.py @@ -88,7 +88,7 @@ def nt_time_from_string(s: str) -> NtTime: dt = datetime.datetime.now(datetime.timezone.utc) elif re.match(r'^\d{14}\.0Z$', s): # "20230127223641.0Z" - dt = datetime.strptime(s, '%Y%m%d%H%M%S.0Z') + dt = datetime.datetime.strptime(s, '%Y%m%d%H%M%S.0Z') else: dt = datetime.datetime.fromisoformat(s) except ValueError: