Mysql '0000-00-00 00:00:00' dates in 5.7

Fix MySQL Incorrect datetime value: '0000-00-00 00:00:00' by changing the sql_mode:

Edit /etc/my.conf

sql_mode=IGNORE_SPACE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

and restart