I am encountering a weird problem. I'm getting the following SQL error on an 
INSERT command.

com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Incorrect 
datetime value: '1969-12-31 18:00:00.0' for column...
The column is a TIMESTAMP in mySQL.

I pasted the SQL statement directly out of my log into phpMyAdmin, and it 
worked.  When I change the date to '2021-08-27 01:03:18.1077537'
it also works.

I tried it on my production AWS server.  The server timezone was different but 
same failure with '1970-01-01 00:00:00.0'

I'm running Win10 with latest updates (AWS Linux 2 on production)
TC 9.0.16
mysql-connector-java-8.0.26.jar
mysql5.7.19

I found some discussions on the web from around 2016.  But it just said to 
update the connector and TC. My versions are already way
past 2016 versions.

My biggest concern is that some dates work and some don't.  If I have to avoid 
dates that fail, I can probably do that.  But right now,
I don't know what dates are going to work and what dates are going to fail.

Am I missing something obvious?  I've never had a SQL statement that failed 
consistently on TC but worked when pasted into phpMyAdmin.

Suggestions?

Thanks.

Jerry

Reply via email to