Aug 25, 2018

[HDGEM] How to fix Java and MySQL time difference

One possible way is to set the time zone in jdbc url link.

useTimezone is an older workaround. You need to set useLegacyDatetimeCode=false to apply new setTimestamp/getTimestamp of later version of mysql-connector

url ="jdbc:mysql://localhost/mydb?useLegacyDatetimeCode=false&serverTimezone=America/New_York";


--
Posted By Blogger to HDGEM at 11/03/2016 08:55:00 AM