git.samba.org
/
gd
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed5f8af
)
python: Correctly qualify strptime()
author
Jo Sutton
<josutton@catalyst.net.nz>
Mon, 4 Mar 2024 23:31:27 +0000
(12:31 +1300)
committer
Andrew Bartlett
<abartlet@samba.org>
Thu, 21 Mar 2024 03:12:33 +0000
(
03:12
+0000)
Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/nt_time.py
patch
|
blob
|
history
diff --git
a/python/samba/nt_time.py
b/python/samba/nt_time.py
index 496dde576b4cd70b8cadf0523b54ed79ccfc5a62..559ff7ca0daba9f8c976e5f8dfb57a9e49efd451 100644
(file)
--- 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: