From 4b3d4442129a0d08b9096020cdd51b0454f8cd74 Mon Sep 17 00:00:00 2001 From: Xinze Guo <101622833+azexcy@users.noreply.github.com> Date: Fri, 17 Nov 2023 15:58:19 +0800 Subject: [PATCH] Remove serverTimezone=UTC --- .../mysql/connector/MySQLConnectionPropertiesParser.java | 1 - .../test/e2e/env/runtime/DataSourceEnvironment.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/infra/database/type/mysql/src/main/java/org/apache/shardingsphere/infra/database/mysql/connector/MySQLConnectionPropertiesParser.java b/infra/database/type/mysql/src/main/java/org/apache/shardingsphere/infra/database/mysql/connector/MySQLConnectionPropertiesParser.java index ed0527a00307f..8a1770fd7232b 100644 --- a/infra/database/type/mysql/src/main/java/org/apache/shardingsphere/infra/database/mysql/connector/MySQLConnectionPropertiesParser.java +++ b/infra/database/type/mysql/src/main/java/org/apache/shardingsphere/infra/database/mysql/connector/MySQLConnectionPropertiesParser.java @@ -54,7 +54,6 @@ private Properties buildDefaultQueryProperties() { result.setProperty("netTimeoutForStreamingResults", "0"); result.setProperty("tinyInt1isBit", Boolean.FALSE.toString()); result.setProperty("useSSL", Boolean.FALSE.toString()); - result.setProperty("serverTimezone", "UTC"); result.setProperty("zeroDateTimeBehavior", "round"); return result; } diff --git a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/DataSourceEnvironment.java b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/DataSourceEnvironment.java index 5742820b8859c..9501b2c9d27f9 100644 --- a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/DataSourceEnvironment.java +++ b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/DataSourceEnvironment.java @@ -88,7 +88,7 @@ public static String getURL(final DatabaseType databaseType, final String host, case "MySQL": return String.format( "jdbc:mysql://%s:%s/%s?useSSL=true&requireSSL=true&enabledTLSProtocols=TLSv1.2,TLSv1.3&verifyServerCertificate=false" - + "&useServerPrepStmts=true&serverTimezone=UTC&useLocalSessionState=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true", + + "&useServerPrepStmts=true&useLocalSessionState=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true", host, port, dataSourceName); case "PostgreSQL": return String.format("jdbc:postgresql://%s:%s/%s?ssl=on&sslmode=prefer", host, port, dataSourceName);