Monday, 19 September 2022

MySQL 5.7 default DateTime

 MySQL 5.7 default dateTime mode, zero dateTime is not allowed.  

Since 0000-00-00 00:00:00 is not a valid DATETIME value, your database is broken. That is why MySQL 5.7 – which comes with NO_ZERO_DATE mode enabled by default – outputs an error when you try to perform a write operation.

So a solution to solve this error by reset the mode, i.e.

SET SQL_MODE='ALLOW_INVALID_DATES';



No comments:

Can Jackson Deserialize Java Time ZonedDateTime

Yes, but must include JSR310. Thus ZonedDateTime can be deserialized directly from JSON response to POJO field. <dependency> <g...