MySQL Incorrect datetime value: '0000-00-00 00:00:00'

后端 未结 19 1054
没有蜡笔的小新
没有蜡笔的小新 2020-11-29 15:51

I\'ve recently taken over an old project that was created 10 years ago. It uses MySQL 5.1.

Among other things, I need to change the default character set from latin1

19条回答
  •  感情败类
    2020-11-29 16:54

    I also got

    SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '0000-00-00 00:00:00' for column

    error info

    Fix this by changing 0000-00-00 00:00:00 to 1970-01-01 08:00:00

    1970-01-01 08:00:00 unix timestamp is 0

提交回复
热议问题