MySql 从数据库中查出时间数据比实际时间 早/晚八个小时解决方法

问题如图示

后台查询出来的

就是这个玩意在作怪:serverTimezone=UTC

解决办法:

改成这样就可以了:serverTimezone=Asia/Shangha

jdbc:mysql://127.0.0.1:3306/basic_project?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&serverTimezone=Asia/Shangha&useSSL=false
附带一个完整的

原文地址:https://www.cnblogs.com/liyh321/p/14062575.html