MySQL Forums
Forum List  »  General

Getting error code 1292 with 'xx:xx:xx xx:xx:xx+00' style datetime
Posted by: Rhett Livingston
Date: October 25, 2014 03:08PM

The following insert performed by the gdal library to push GIS data into a MySQL database works with MySQL 5.6.20 and errors with MySQL 5.7.5.

INSERT INTO `track_points` (`SHAPE` , `track_fid`, `track_seg_id`, `track_seg_point_id`, `ele`, `time`) VALUES (GeometryFromText('POINT (-81.251549 28.670652)',1) , 0, 0, 0, 10.5, '2014/10/20 10:55:54+00')

The error produced is

Error Code: 1292. Incorrect datetime value: '2014/10/20 10:55:54+00' for column 'time' at row 1

It appears that gdal adds the '+00' to explicitly state that this is zulu time, not local time.

I realize that gdal may need to state this in some other way. However, the way they state it worked before and has stopped working. So MySQL has changed.

My question is first whether the change is perhaps a setting in my installation as opposed to an actual code change from 5.6.20 to 5.7.5? If it is a code change, intentional, unintentional but correct, or unintentional but bug?

Since I'm building a GIS application, I really don't want to go back to 5.6.x and the only workaround I've figured out (other than asking gdal team to fix issue) is to have gdal create csv files instead of going straight to mysql.

Options: ReplyQuote


Subject
Written By
Posted
Getting error code 1292 with 'xx:xx:xx xx:xx:xx+00' style datetime
October 25, 2014 03:08PM


Sorry, you can't reply to this topic. It has been closed.

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.