Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1514488 - OperationalError "Incorrect datetime value" when inserting timezone aware datetime
Summary: OperationalError "Incorrect datetime value" when inserting timezone aware dat...
Keywords:
Status: ASSIGNED
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: MySQL-python
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Michal Schorm
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
: 1502096 1695646 (view as bug list)
Depends On:
Blocks: 1381612
TreeView+ depends on / blocked
 
Reported: 2017-11-17 14:32 UTC by Ollie Walsh
Modified: 2019-04-09 13:05 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 4033731 Troubleshoot None Online Nova DB migration Failed 2019-04-03 14:33:03 UTC

Description Ollie Walsh 2017-11-17 14:32:10 UTC
Description of problem:
MySQL-python does not correctly convert timezone aware python datetime objects. The UTC offset is included.

Version-Release number of selected component (if applicable):
MySQL-python-1.2.5

How reproducible:
always



Steps to Reproduce:

Attempt to insert a timezone aware datetime object such as:
>>> from pytz import UTC
>>> import datetime
>>> datetime.datetime.now(tz=UTC).isoformat(" ")
'2017-11-17 14:29:11.309563+00:00'

Actual results:
OperationalError

Expected results:
datetime object correctly converted to Mysql datetime value and inserted.

Additional info:
https://github.com/PyMySQL/mysqlclient-python/issues/19

Comment 3 Ollie Walsh 2017-11-23 19:05:21 UTC
*** Bug 1502096 has been marked as a duplicate of this bug. ***

Comment 11 Lee Yarwood 2019-04-04 16:42:02 UTC
*** Bug 1695646 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.