FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Server:解决 Windows 上 MySQL 7 及以下版本报错 The server time zone value 'Öйú±… · loopwang/APIJSON@31dff13 · GitHub

forked from APIJSON/APIJSON

Commit 31dff13

Browse files
committed
Server:解决 Windows 上 MySQL 7 及以下版本报错 The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone
1 parent 0857fac commit 31dff13

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎APIJSON-Java-Server/APIJSONBoot/src/main/java/apijson/demo/server/DemoSQLExecutor.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public PreparedStatement getStatement(@NotNull SQLConfig config) throws Exceptio
122122
+ config.getDBAccount() + "&password=" + config.getDBPassword());
123123
}
124124
else {
125-
connection = DriverManager.getConnection(config.getDBUri() + "?useUnicode=true&characterEncoding=UTF-8&user="
125+
connection = DriverManager.getConnection(config.getDBUri() + "?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8&user="
126126
+ config.getDBAccount() + "&password=" + config.getDBPassword());
127127
}
128128
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL