diff --git a/history/latest/3127.md b/history/latest/3127.md new file mode 100644 index 000000000..ed7997157 --- /dev/null +++ b/history/latest/3127.md @@ -0,0 +1,4 @@ +- **[jdbc-v2]** A `LocalDateTime` bound via `setObject` on the text path is now interpreted in the + server/column time zone instead of the JVM default time zone, matching `Timestamp` and the reader. + Behaviour change on a non-UTC JVM; set `jdbc_legacy_localdatetime_jvm_timezone=true` to restore the + old behaviour. (https://github.com/ClickHouse/clickhouse-java/issues/3127) diff --git a/jdbc-v2/src/main/java/com/clickhouse/jdbc/DriverProperties.java b/jdbc-v2/src/main/java/com/clickhouse/jdbc/DriverProperties.java index 8bbcfd10b..b6abddd46 100644 --- a/jdbc-v2/src/main/java/com/clickhouse/jdbc/DriverProperties.java +++ b/jdbc-v2/src/main/java/com/clickhouse/jdbc/DriverProperties.java @@ -72,6 +72,12 @@ public enum DriverProperties { + "max_result_rows with result_overflow_mode=break. This overrides the overflow mode that the user sets.") USE_MAX_RESULT_ROWS("jdbc_use_max_result_rows", String.valueOf(Boolean.FALSE)), + @ConfigDescription("Legacy. When true, a LocalDateTime bound through setObject on the text path is " + + "converted using the JVM default time zone (the behaviour before the fix for issue #3127). " + + "The default false sends the local date-time unchanged, so the server interprets it in the " + + "column or server time zone, matching Timestamp and the reader.") + LEGACY_LOCALDATETIME_JVM_TIMEZONE("jdbc_legacy_localdatetime_jvm_timezone", String.valueOf(Boolean.FALSE)), + /** * Configures what SQL parser will be used. Choices: *