This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Rayologist
Recipients Rayologist
Date 2022-02-06.19:03:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1644174239.54.0.192057033337.issue46662@roundup.psfhosted.org>
In-reply-to
Content
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 <module>
    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'
History
Date User Action Args
2022-02-06 19:03:59Rayologistsetrecipients: + Rayologist
2022-02-06 19:03:59Rayologistsetmessageid: <1644174239.54.0.192057033337.issue46662@roundup.psfhosted.org>
2022-02-06 19:03:59Rayologistlinkissue46662 messages
2022-02-06 19:03:59Rayologistcreate