### Describe the bug `date_trunc` drops timezone while the input is timestamptz ### To Reproduce ```bash ❯ select date_trunc('hour', timestamptz '2000-01-01T00:00:00Z'); +------------------------------------------------------+ | datetrunc(Utf8("hour"),Utf8("2000-01-01T00:00:00Z")) | +------------------------------------------------------+ | 2000-01-01T00:00:00 | +------------------------------------------------------+ 1 row in set. Query took 0.002 seconds. ``` ### Expected behavior 2000-01-01T00:00:00Z ### Additional context _No response_
Activity
waitingkuo commentedon Apr 12, 2023
@tustvold i think this issue depends on #5952 as well
Weijun-H commentedon Jun 30, 2023
I am willing to handle this issue this weekend.
Weijun-H commentedon Jun 30, 2023
The problem probably does not arise from the usage of
date_trunc, but rather from the utilization oftimestampandtimestamptz.But I did not find the related stuff about the
timestamptzdefinition 🤔.tustvold commentedon Jun 30, 2023
I think there are two related issues:
The output in the final case should be
2000-01-01T00:00:00+08:00