Add serverTimezone to MySQL connection URL

This commit is contained in:
Eric 2019-07-22 15:22:41 +02:00
parent 27a3d8da9e
commit 67c55be518

View File

@ -20,7 +20,7 @@ public class MySQL extends Database {
@Override
HikariDataSource getDataSource() {
HikariConfig config = new HikariConfig();
config.setJdbcUrl(String.format("jdbc:mysql://%s:%d/%s?autoReconnect=true&useSSL=false",
config.setJdbcUrl(String.format("jdbc:mysql://%s:%d/%s?autoReconnect=true&useSSL=false&serverTimezone=UTC",
Config.databaseMySqlHost, Config.databaseMySqlPort, Config.databaseMySqlDatabase));
config.setUsername(Config.databaseMySqlUsername);
config.setPassword(Config.databaseMySqlPassword);