Skip to content

Julia: No TimeZone config #6349

Description

@xcaptain

What happens?

I found that the juliapkg doesn't contains a TimeZone config, which means when using julia, the timezone is always UTC and can't change to another one.

My test code:

using DBInterface
using DuckDB

con = DBInterface.connect(DuckDB.DB, ":memory:")
DBInterface.execute(con, "select current_timestamp;")

got

1×1 DataFrame
 Row │ get_current_timestamp() 
     │ DateTime?
─────┼─────────────────────────
   1 │ 2023-02-17T09:39:07.618

while using CLI, execute the query select current_timestamp I got

v0.7.0 f7827396d7
Enter ".help" for usage hints.
D select current_timestamp;
┌────────────────────────────┐
│  get_current_timestamp()   │
│  timestamp with time zone  │
├────────────────────────────┤
│ 2023-02-17 17:34:31.361+08 │
└────────────────────────────┘

To Reproduce

I tried to set timezone for the current connection session using the following code:

config = DuckDB.Config()
config = DuckDB.set_config(config, "TimeZone", "Asia/Shanghai")

got an error:

ERROR: Unrecognized configuration option "TimeZone"
Stacktrace:
 [1] set_config(config::DuckDB.Config, name::String, option::String)
   @ DuckDB C:\Users\capta\.julia\packages\DuckDB\B2yPk\src\config.jl:27
 [2] top-level scope
   @ REPL[32]:1

OS:

Windows

DuckDB Version:

v0.7.0 f782739

DuckDB Client:

julia

Full Name:

Joey

Affiliation:

Self-Employed

Have you tried this on the latest master branch?

  • I agree

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • I agree

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