Some background:
I have a Java 1.6 webapp running on Tomcat 7. The database is MySQL 5.5. Previously, I was using Mysql JDBC driver 5.1.23 to connect to the DB. Ever
The above program will generate that time zone error.
After your database name you have to add this: ?useTimezone=true&serverTimezone=UTC. Once you have done your code will work fine.
?useTimezone=true&serverTimezone=UTC
Best of luck :)