依次执行这两条SQL语句:
注意标点符号要英文标点
show variables like '%time_zone';
set GLOBAL time_zone='+8:00';
或者直接在代码中配置如下:
jdbc:mysql://localhost:3306/infosystem
?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
依次执行这两条SQL语句:
注意标点符号要英文标点
show variables like '%time_zone';
set GLOBAL time_zone='+8:00';
或者直接在代码中配置如下:
jdbc:mysql://localhost:3306/infosystem
?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai