数据库
首页 > 数据库> > SQLException: The server time zone value ‘EDT‘ is unrecognized or represents more than one time zone

SQLException: The server time zone value ‘EDT‘ is unrecognized or represents more than one time zone

作者:互联网

异常:java.sql.SQLException: The server time zone value 'EDT' is unrecognized or represents more than one time zone.

You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support.
 

服务器的时区值"EDT"无法识别,或表示多个时区,这种错误表示新版本的数据库连接程序需要指定UTC时区,只要再url后面加上指定的时区即可

通常mysql返回的时间比实际时间总是早8小时,MySQL文档中,可用的时区都在/usr/share/zoneinfo目录下面,一般配置URL时,可以尝试GMT,GMT8,UTC+8,UTC0800等...

jdbc配置异常:

 

改正之后:

标签:represents,zone,value,server,EDT,time,more
来源: https://blog.csdn.net/Dongguabai/article/details/111408149