服务器时区值"CDT"无法识别或代表多个时区 [英] server time zone value 'CDT' is unrecognized or represents more than one time zone

查看:498
本文介绍了服务器时区值"CDT"无法识别或代表多个时区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试连接到我网站上的mySQL时,我收到此消息 java.sql.SQLException:

When trying to connect to a mySQL on my website I get this message java.sql.SQLException:

无法识别服务器时区值"CDT"或 代表多个时区.您必须配置服务器或 JDBC驱动程序(通过serverTimezone配置属性)使用更多 如果要利用时区支持,请指定特定的时区值.

The server time zone value 'CDT' 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.

我确实尝试使用

serverTimezone=CDT

但是我明白了 java.sql.SQLException:

but I get this java.sql.SQLException:

"CDT"没有时区映射条目

No timezone mapping entry for 'CDT'

推荐答案

CDT不是有效的时区标识符.这是许多不同时区的缩写,例如中央夏令时或古巴夏令时.

CDT is not a valid timezone identifier. It's an abbreviation for a number of different timezones e.g. Central Daylight Time or Cuba Daylight Time.

如果您正在寻找美国中部时间,则很可能要配置America/Chicago时区.您可以通过运行select * from time_zone_name;查询来检查MySQL服务器中可用的值.

Most likely you want to configure America/Chicago timezone if you are looking for American central time. You can check what values are available in your MySQL server by running select * from time_zone_name; query.

这篇关于服务器时区值"CDT"无法识别或代表多个时区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆