Skip to content

Using the global TimeZone config in the Properties object passed to DriverManager.getConnection fails with error: "The following options were not recognized: TimeZone" #417

@jivanic-demystdata

Description

@jivanic-demystdata

This error seems counter-intuitive as this config is documented as global: https://duckdb.org/docs/stable/configuration/overview.html#global-configuration-options

Shouldn't this Properties object allow us to configure the global timezone of our statements?

Reproducer (scala code):

val config = new Properties()
config.put("TimeZone", "UTC")
DriverManager.getConnection(url, config).unwrap(classOf[DuckDBConnection])

Error:

        java.sql.SQLException: Invalid Input Error: The following options were not recognized: TimeZone
        	at org.duckdb.DuckDBNative.duckdb_jdbc_startup(Native Method)
        	at org.duckdb.DuckDBConnection.newConnection(DuckDBConnection.java:62)
        	at org.duckdb.DuckDBDriver.connect(DuckDBDriver.java:114)
        	at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:683)
        	at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:191)
        	...

cc @guizmaii

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions