Set serverTimezone property on MySQL driver

This commit is contained in:
Luck 2020-11-11 13:00:02 +00:00
parent 9f8b4b2404
commit 62270bfd93
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -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);
}