tustvold commented on issue #5976:
URL:
https://github.com/apache/arrow-datafusion/issues/5976#issuecomment-1615207802
I think there are two related issues:
* The output always lacks a timezone
* The truncation should occur in the timestamp's timezone
```
❯ set timezone to '+08:00';
0 rows in set. Query took 0.001 seconds.
❯ select timestamptz '2000-01-01T00:00:00';
+-----------------------------+
| Utf8("2000-01-01T00:00:00") |
+-----------------------------+
| 2000-01-01T00:00:00+08:00 |
+-----------------------------+
❯ select date_trunc('day', timestamptz '2000-01-01T00:00:00');
+-----------------------------------------------------+
| date_trunc(Utf8("day"),Utf8("2000-01-01T00:00:00")) |
+-----------------------------------------------------+
| 1999-12-31T00:00:00 |
+-----------------------------------------------------+
1 row in set. Query took 0.002 seconds.
```
The output in the final case should be `2000-01-01T00:00:00+08:00`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]