Skip to content

Instantly share code, notes, and snippets.

@kevinhooke
Created August 25, 2020 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinhooke/221bd673781385a07b4a796c1388788a to your computer and use it in GitHub Desktop.
Save kevinhooke/221bd673781385a07b4a796c1388788a to your computer and use it in GitHub Desktop.
mysql timezone error
Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value 'PDT' 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.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
- add default timezone to server my.cnf:
timezone='UTC'
- add to JDBC connection url:
?serverTimezone=UTC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment