1. 程式人生 > 實用技巧 >The server time zone value ‘???ú±ê×??±??‘ is unrecognized or represents more than one time zone.錯誤解決

The server time zone value ‘???ú±ê×??±??‘ is unrecognized or represents more than one time zone.錯誤解決

在 連線 資料庫 時報一下錯誤,粗略看 是 資料庫 連線 失敗
在這裡插入圖片描述
在這裡插入圖片描述
同時報錯
The server time zone value '???ú±ê×??±??' 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.

錯誤提示:The server time zone value ‘???ú±ê×??±??’ is unrecognized or represents more than one time zone.

錯誤原因:多方查詢發現是mysql得時區問題,比實際時間要早,所以需要在JDBC得連線URL後面加上serverTimezone=GMT即可解決問題,低版本得5.xxx沒有存在這個時區問題,8.0這些才存在這個問題