Skip to content

Extract sql expression no longer is timezone aware #18228

@Omega359

Description

@Omega359

Describe the bug

From the documentation on config_options.execution.time_zone it looks like Extract in sql used to be aware of the system time zone however that looks to have been lost at some point. I am unable to determine when exactly but I suspect it was when that functionality was extracted/migrated to use the date_part UDF.

The fix for this is likely to make date_part udf time zone aware in a similar manner that now, to_timestamp, etc are being updated.

I also was unable to find any slt tests that covered this - from what I could find the tests for extract only ever used +00:00 as the tz.

To Reproduce

No response

Expected behavior

extract(Hour from some_time) should likely be aware of configured timezone.

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions