问题描述
当尝试连接到我网站上的mySQL时,我收到此消息 java.sql.SQLException
:
When trying to connect to a mySQL on my website I get this message java.sql.SQLException
:
我确实尝试使用
serverTimezone=CDT
但是我明白了 java.sql.SQLException
:
but I get this java.sql.SQLException
:
推荐答案
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"无法识别或代表多个时区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!