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配置异常:

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

上一篇:Android番外篇 如何从一个EditText跳转到另一个EditText


下一篇:【贪心】选择不相交区间问题