Skip to content
Advertisement

The server time zone value ‘AEST’ is unrecognized or represents more than one time zone

I’m trying to setup a simple hibernate application, when I run it I get a stack trace full of errors.

I have the following maven dependencies in my pom.xml file:

JavaScript

And the mysql version I’m running locally is:

JavaScript

I’m running, what seems, a very simple method, and still getting errors:

JavaScript

After the above is executed, I get a long stack trace…The System.out.println doesn’t print either…So the connection just doesn’t seem to be connecting.

JavaScript

I’m focused on this error here:

The server time zone value ‘AEST’ 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’m unsure how I fix it?

Edit:

Printing out the Timezone (System.out.println(TimeZone.getDefault());) prints the following details:

sun.util.calendar.ZoneInfo[id=”Australia/Melbourne”,offset=36000000,dstSavings=3600000,useDaylight=true,transitions=142,lastRule=java.util.SimpleTimeZone[id=Australia/Melbourne,offset=36000000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=9,startDay=1,startDayOfWeek=1,startTime=7200000,startTimeMode=1,endMode=3,endMonth=3,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=1]]

Edit:

So I looked at the question which was flagged, and tried to change my connection string, but it’s still throwing the same stack trace. Below is my new connection url. As you can see I changed the serverTimezone to that of the printed Timezone.getDefault()

JavaScript

Advertisement

Answer

Turns out 6.x wasn’t compatible, moving to 5.1.39 fixed it.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement