habalux commented on issue #4319: convert postgresql date_trunc() to UTC to prevent pandas error URL: https://github.com/apache/incubator-superset/pull/4319#issuecomment-363704684 I ran some more tests of my own, and it seems that just converting to UTC will cause invalid times with the type "timestamp without time zone" as it adds the current (session) timezone to the timestamp. It also swaps the return type so "timestamp without time zone" becomes "timestamp with time zone" and vice versa. I found that the most consistent approach would be to use "SET TIMEZONE to 'UTC';" at the start of a connection and then casting to "timestamp without time zone". This way all returned timestamps would be in UTC. Couldn't find a proper place to set a query to run at connection time though, any pointers? Also this would then require the UI to handle TZ conversions when rendering the data.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
