I\'m getting the following exception updating a row using MySQL via JDBC:
com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value: \
My problem was caused by DST, too. I've fixed it by changing column data type from timestamp
to datetime
. This answer describes the difference, in short:
INSERT
/UPDATE
and different SELECT
results. Some time points are invalid due to DST;Note: you may still have to deal with "missing" time. This approach just shifts responsibility from DB level to application level.
See also: MySQL documentation for TIMESTAMP vs DATETIME