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%2B8
to indicate when China region, &serverTimezone=Asia/Shanghai
is also OK