查看时区:
SHOW VARIABLES LIKE "%time_zone%";
输出
Variable_name Value system_time_zone CST time_zone SYSTEM
分析:
这里有两个变量,其中 time_zone 是指 mysql 数据库的时区。默认为 SYSTEM,即等于服务器的系统时区。
system_time_zone 表示系统时区,因为我们的系统服务器是在中国,system_time_zone 为 CST(China Standard Time)。
这里有个坑,CST 除了表示中国时区,它还有更多含义:
原文:https://www.cnblogs.com/lemos/p/11935682.html