From 62270bfd93467b6043bdeacf56b699911c5b90f9 Mon Sep 17 00:00:00 2001 From: Luck Date: Wed, 11 Nov 2020 13:00:02 +0000 Subject: [PATCH] Set serverTimezone property on MySQL driver --- .../sql/connection/hikari/MySqlConnectionFactory.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/implementation/sql/connection/hikari/MySqlConnectionFactory.java b/common/src/main/java/me/lucko/luckperms/common/storage/implementation/sql/connection/hikari/MySqlConnectionFactory.java index 985070bf3..777141594 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/implementation/sql/connection/hikari/MySqlConnectionFactory.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/implementation/sql/connection/hikari/MySqlConnectionFactory.java @@ -71,6 +71,11 @@ public class MySqlConnectionFactory extends HikariConnectionFactory { properties.putIfAbsent("alwaysSendSetIsolation", "false"); properties.putIfAbsent("cacheCallableStmts", "true"); + // https://stackoverflow.com/a/54256150 + // It's not super important which timezone we pick, because we don't use time-based + // data types in any of our schemas/queries. + properties.putIfAbsent("serverTimezone", "UTC"); + super.overrideProperties(properties); }