From cd7b0720de7b85903c5d4dfb74fb66bd29519f1d Mon Sep 17 00:00:00 2001 From: Jo Sutton Date: Tue, 5 Mar 2024 12:31:27 +1300 Subject: [PATCH] python: Correctly qualify strptime() Signed-off-by: Jo Sutton Reviewed-by: Andrew Bartlett --- python/samba/nt_time.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.11.4.GIT