Bug #83479 fix microsecond conversion from MySQL DATETIME to Python datetime (contribution)

Submitted: 21 Oct 2016 13:29 Modified: 5 Nov 2020 20:15
Reporter: OCA Admin (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / Python Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[21 Oct 2016 13:29] OCA Admin
Description:
This bug tracks a contribution by Vilnis Termanis (Github user: vtermanis) as described in http://github.com/mysql/mysql-connector-python/pull/26

How to repeat:
See description

Suggested fix:
See contribution code attached
[21 Oct 2016 13:29] OCA Admin
Contribution submitted via Github - fix microsecond conversion from MySQL DATETIME to Python datetime 
(*) Contribution by Vilnis Termanis (Github vtermanis, mysql-connector-python/pull/26#issuecomment-255333242): I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: git_patch_90223225.txt (text/plain), 1.22 KiB.

[21 Oct 2016 14:35] MySQL Verification Team
Thank you for the contribution.
[29 Jun 2020 13:19] server office
This bug resurfaced, or was not properly fixed/merged/released
It still affects mysql-connector-python (8.0.20)
[5 Nov 2020 20:15] Philip Olson
Posted by developer:
 
Fixed as of the upcoming 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.

Thank you for the bug report.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.