Workaround user side is for now is an explicit LOAD icu; to have this to properly work.
To Reproduce
select cast(to_timestamp(100000) at time zone 'PST' as date) as event_date;
--- Error!
LOAD icu;
select cast(to_timestamp(100000) at time zone 'PST' as date) as event_date;
--- Works!
What happens?
ICU is not properly autoloaded while handling time zones.
This is a duckdb issue, but particularly visible in DuckDB-Wasm due to the fact that ICU is usally built-in. Opened here for tracking, has been reported https://github.com/duckdb/duckdb-wasm/issues/1274#issuecomment-1972272711 or https://github.com/duckdb/duckdb-wasm/issues/1274#issuecomment-2165589650 independently.
Workaround user side is for now is an explicit
LOAD icu;
to have this to properly work.To Reproduce
See https://shell.duckdb.org/#queries=v0,select-cast(to_timestamp(100000)-at-time-zone-'PST'-as-date)-as-event_date~,LOAD-icu~,select-cast(to_timestamp(100000)-at-time-zone-'PST'-as-date)-as-event_date
Browser/Environment:
any
Device:
any
DuckDB-Wasm Version:
1.28.1-dev231.0
DuckDB-Wasm Deployment:
shell.duckdb.org
Full Name:
Carlo Piovesan
Affiliation:
DuckDB Labs