You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) code example
Example: jdbc driver servertimezone configuration property
jdbc:mysql://localhost/db?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC