【发布时间】:2019-09-24 21:12:13
【问题描述】:
我想将 serverTimezone 更改为 GMT+3。 我试试这个,但不工作
spring.datasource.url=jdbc:mysql://localhost:3306/example?useSSL=false&serverTimezone=GMT+3&useLegacyDatetimeCode=false
Caused by: java.sql.SQLException: No timezone mapping entry for 'GMT 3'
但如果我运行它,它正在使用 GMT-3
spring.datasource.url=jdbc:mysql://localhost:3306/example?useSSL=false&serverTimezone=GMT-3&useLegacyDatetimeCode=false
如何将其更改为 GMT+3 ?
【问题讨论】:
-
你用的是哪个Mysql版本?
-
简而言之:因为这是一个URI,所以
+应该被编码为%2B
标签: spring-boot jdbc