New submission from Bo-wei Chen :
convert_timestamp function in Lib/sqlite3/dbapi2.py fails to parse a timestamp
correctly, if it does not have microseconds but comes with timezone
information, e.g. b"2022-02-01 16:09:35+00:00"
Traceback:
Traceback (most recent call last):
File "/Users/user/Desktop/test.py", line 121, in
convert_timestamp(b"2022-02-01 16:09:35+00:00")
File "/Users/user/Desktop/test.py", line 112, in convert_timestamp
hours, minutes, seconds = map(int, timepart_full[0].split(b":"))
ValueError: invalid literal for int() with base 10: b'35+00'
--
components: Library (Lib)
messages: 412655
nosy: Rayologist
priority: normal
severity: normal
status: open
title: Lib/sqlite3/dbapi2.py: convert_timestamp function failed to correctly
parse timestamp
type: behavior
versions: Python 3.9
___
Python tracker
<https://bugs.python.org/issue46662>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com