If you are using different connector then you need to use the mariadb driver for sure (also change JDBC connection string)
check https://mariadb.com/kb/en/mariadb/about-the-mariadb-java-client/
Please note that the driver class provided by the MariaDB Client Library for Java Applications is not com.mysql.jdbc.Driver but org.mariadb.jdbc.Driver!
updating timestamp will not work otherwise and when update or insert fails you get the 0000-00-00 00:00:00
I had this same problem when switching from MySQL to MariaDB...