MySQL Java JDBC Insert time difference is 14 hours

First of all, you can read this article for details: https://www.imooc.com/article/280264

The general reason is because of the CST time zone problem. Other articles hope to change the time_zone configuration.

But sometimes there is no way to directly modify the online database or test database.

So on the plus jdbc connection string &serverTimezone=GMT%2B8to indicate when China region, &serverTimezone=Asia/Shanghaiis also OK

Guess you like

Origin blog.csdn.net/cainiao1412/article/details/113701380