waitingkuo commented on issue #3148: URL: https://github.com/apache/arrow-datafusion/issues/3148#issuecomment-1247254420
@alamb @avantgardnerio i just finished 1. Add timestamp but not timestamp with timezone 2. Hard code the server "local" time zone to always be UTC, such that show time zone always returns UTC and set time zone 'UTC' is the only set command that will not produce an error i'm just starting the work for `timestamp with timezone`, things become trickier now postgresql has this <https://www.postgresql.org/docs/current/functions-formatting.html> ``` to_timestamp ( text, text ) → timestamp with time zone ``` Converts string to time stamp according to the given format. (See also to_timestamp(double precision) in [Table 9.32](https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-TABLE).) to_timestamp('05 Dec 2000', 'DD Mon YYYY') → 2000-12-05 00:00:00-05 and this <https://www.postgresql.org/docs/current/functions-datetime.html> ``` to_timestamp ( double precision ) → timestamp with time zone ``` Convert Unix epoch (seconds since 1970-01-01 00:00:00+00) to timestamp with time zone to_timestamp(1284352323) → 2010-09-13 04:32:03+00 Looks like its `to_timestamp` always return `timestamp with time zone` Do you think we should align these function signatures with postgresql? There will be more things to change once we have timestamp with non-UTC timezone 💔 BTW Datafusion's `now()` output `timestamp with time zone` which is same as what postgresql has 👍 -- 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]
