简体   繁体   中英

server time zone value 'CDT' is unrecognized or represents more than one time zone

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

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.

I did try using

serverTimezone=CDT

but I get this java.sql.SQLException :

No timezone mapping entry for 'CDT'

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM