Skip to content

Commit

Permalink
[CONJ-1171] ensure compatibility with 3.x current behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Apr 22, 2024
1 parent 0a7a094 commit 4a0b526
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/mariadb/jdbc/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class Configuration {
// various
private String timezone = null;
private String connectionTimeZone = null;
private boolean forceConnectionTimeZoneToSession = true;
private Boolean forceConnectionTimeZoneToSession = null;
private boolean preserveInstants;
private Boolean autocommit = null;
private boolean useMysqlMetadata = false;
Expand Down Expand Up @@ -1600,7 +1600,7 @@ public String connectionTimeZone() {
*
* @return forceConnectionTimeZoneToSession
*/
public boolean forceConnectionTimeZoneToSession() {
public Boolean forceConnectionTimeZoneToSession() {
return forceConnectionTimeZoneToSession;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ public String createSessionVariableQuery(Context context) {
}

// force client timezone to connection to ensure result of now(), ...
if (conf.forceConnectionTimeZoneToSession()) {
if (conf.forceConnectionTimeZoneToSession() == null || conf.forceConnectionTimeZoneToSession()) {
TimeZone connectionTz = context.getConnectionTimeZone();
ZoneId connectionZoneId = connectionTz.toZoneId();

Expand Down

0 comments on commit 4a0b526

Please sign in to comment.