MySQL JDBC 连接字符串如何设置中国时区
将 serverTimezone 参数的值从 'UTC+8' 改为 'Asia/Shanghai'。这样,连接字符串将改为 jdbc:mysql://localhost:3306/object?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai。
原文地址: https://www.cveoy.top/t/topic/hngP 著作权归作者所有。请勿转载和采集!