Bug #100034 | datetime precision incorrectly converted from MySQL datetime to Python datetime | ||
---|---|---|---|
Submitted: | 29 Jun 2020 13:17 | Modified: | 11 May 2022 17:47 |
Reporter: | server office | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / Python | Severity: | S2 (Serious) |
Version: | mysql-connector-python (8.0.20), 8.0.20 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | conversion, datetime, precision, python |
[29 Jun 2020 13:17]
server office
[30 Jun 2020 6:06]
MySQL Verification Team
Hello! Thank you for the report and test case. regards, Umesh
[11 May 2022 17:47]
Philip Olson
It appears this bug was forgotten/lost over time, and we're sorry for the delayed response. Bug #83479 was fixed in v8.0.23. Adding this bug number to that release note. Thank you for being persistent with a follow-up bug report.
[5 May 2023 8:05]
MySQL Verification Team
Quoting from Bug #83479, Fixed in MySQL Connector/Python 8.0.23 release, and here's the proposed changelog entry from the documentation team: Fixed the microsecond conversion from MySQL datetime to Python datetime when using fractional values with the C extension enabled. For example, 2016-10-20 15:40:23.8 from MySQL resulted in datetime.datetime(2016, 10, 20, 15, 40, 23, 8) instead of datetime.datetime(2016, 10, 20, 15, 40, 23, 800000). Thanks to Vilnis Termanis for the patch.