daniel
daniel

Reputation: 231

spring boot jdbc The server time zone value 'Jerusalem Standard Time' is unrecognized

this is the first time i use jdbc in spring boot so i was following this guide: https://spring.io/guides/gs/accessing-data-mysql/

everything was looking fine till i tried to compile it and got this error:

The server time zone value 'Jerusalem Standard Time' 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.

Upvotes: 1

Views: 1184

Answers (1)

Jonathan JOhx
Jonathan JOhx

Reputation: 5978

I think that you need to add ?serverTimezone=IST in your application.properties on line spring.datasource.url = ...

spring.datasource.url=jdbc:mysql://localhost:3306/db_example?serverTimezone=IST

Upvotes: 3

Related Questions