i have app doctrine 1 , generate update_datetime
fields objects via new zend_date->getiso()
. worked fine years, got new notebook , doctrine tries insert datetime
fields string "2013-07-12t03:00:00+07:00"
instead of normal mysql datetime format "2013-07-12 00:00:00"
totally weird.
the same code runs fine on computer. identical – mysql 5.6.12, php 5.3.15 on both. idea should look?
fatal error: uncaught exception 'doctrine_connection_mysql_exception' message 'sqlstate[22007]: invalid datetime format: 1292 incorrect datetime value: '2013-07-12t03:00:00+07:00' column 'nextrun' @ row 1' in library/doctrine/connection.php:1083
update
ok stackoverflow community solved it. problem strict_trans_tables
in sql_mode
variable. changing in /etc/my.cnf
seemed not enough, had run mysql -uroot
, type following:
set sql_mode=no_engine_substitution; set global sql_mode=no_engine_substitution;
thus removing strict_trans_tables
update2 how rid of strict forever? how rid of strict sql mode in mysql
if exists, can try removing strict_trans_tables
sql-mode in my.ini.
this can cause error datetime string value containing format have not being converted mysql datetime. my.ini change reported fix in:
Comments
Post a Comment