ClickHouse-Native-JDBC icon indicating copy to clipboard operation
ClickHouse-Native-JDBC copied to clipboard

Can‘t work when server reply `posixrules` timezone, i.e. Unknown time-zone ID: posixrules

Open baibaichen opened this issue 4 years ago • 1 comments

Environment

  • OS version: general
  • JDK version: openjdk 8
  • ClickHouse Server version: latest
  • ClickHouse Native JDBC version: 2.5.3
  • ClickHouse Server OS version: suse 11.4
  • (Optional) Spark version: N/A
  • (Optional) Other components' version: N/A

Error logs

image

This is because current jdk doesn't support posixrules zoneid, but official JDBC supports it, see https://github.com/ClickHouse/clickhouse-jdbc/blob/master/clickhouse-jdbc/src/main/java/ru/yandex/clickhouse/ClickHouseConnectionImpl.java#L93 which uses Timezone

baibaichen avatar Mar 26 '21 14:03 baibaichen

TL;DR posixrules is deprecated, typically, we can treat it as US/Eastern for compatibility. See detail at https://www.postgresql.org/docs/12/datetime-posix-timezone-specs.html

pan3793 avatar Mar 29 '21 01:03 pan3793