MYSQL incorrect DATETIME format

前端 未结 4 1791
醉酒成梦
醉酒成梦 2020-12-09 16:15

I have an app with Doctrine 1 and I generate update_datetime fields for objects via new Zend_Date->getIso(). It worked just fine for years, but

4条回答
  •  有刺的猬
    2020-12-09 17:15

    Ok with the help from StackOverflow community I finally solved it. The problem was with STRICT_TRANS_TABLES in sql_mode variable. But changing it in /etc/my.cnf seemed not enough, so I had to run mysql -uroot and type the following:

    set sql_mode=NO_ENGINE_SUBSTITUTION; set global sql_mode=NO_ENGINE_SUBSTITUTION;

    Thus removing STRICT_TRANS_TABLES

    ------this answer works

提交回复
热议问题