mirror of
https://github.com/samba-team/samba.git
synced 2025-12-13 16:23:50 +03:00
python: Correctly qualify strptime()
Signed-off-by: Jo Sutton <josutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
ed5f8af329
commit
cd7b0720de
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user