superset icon indicating copy to clipboard operation
superset copied to clipboard

Timestamps are only displayed in UTC and not in local timezone

Open jay-finn opened this issue 6 years ago • 7 comments

All timestamps are only displayed in UTC and not in the local timezone. I found this issue from 2 years ago regarding this, but there was no resolution: https://github.com/apache/incubator-superset/issues/3928

Ideally, this should be configurable to allow users to select their timezone. Are there any plans to support this?

jay-finn avatar Apr 02 '20 08:04 jay-finn

I can't reproduce it. I did this simple test.

My Database is in UTC :

image

But when query in Superset, I am in EST, image

Seems that it shows accordingly. Can you please show an example to reproduce?

eugeniamz avatar Apr 08 '20 22:04 eugeniamz

@eugeniamz Thanks for getting back to me. My DB is in UTC as well and this is the result of my query: Screen Shot 2020-04-08 at 10 30 50 PM

And the exact same query when run in SQL Lab (I am in PST) Screen Shot 2020-04-08 at 10 31 32 PM

Did you have to SET the timezone first to get the correct results? Or do anything else?

I'm using Superset 0.35.1.

jay-finn avatar Apr 09 '20 05:04 jay-finn

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

stale[bot] avatar Jun 08 '20 05:06 stale[bot]

Same issue. I'm using clickhouse and superset. image Datetime data is converted to utc timezone, I'm confused. I have changed the superset host and container timezone to db's timezone(Asia/Shanghai). Tried https://pypi.org/project/sqlalchemy-clickhouse-timezone/ , but no sense.

I'm using amancevice/superset:0.36.0 docker image.

mkdym avatar Jul 15 '20 03:07 mkdym

https://github.com/apache/incubator-superset/issues/9304#issuecomment-609524741

There are significant complexity revolving timezone configs. Superset decided to always UTC time to keep things simple. It'd be quite some work if we want to add custom timezone support.

mkdym avatar Jul 15 '20 04:07 mkdym

#9304 (comment)

There are significant complexity revolving timezone configs. Superset decided to always UTC time to keep things simple. It'd be quite some work if we want to add custom timezone support.

I found that this problem only occurs when using clickhouse, superset will visual local time when the datasource is mysql. I guess whether there are some bugs when connecting clickhouse

poleft avatar Mar 05 '21 07:03 poleft

Seeing the same even without clickhouse. Using a postgresql database and while the field dtype is a timestamp with time zone and looks that way in the SQL Lab, when displayed on a chart, the timezone offset is just thrown away.

krsnik93 avatar Nov 04 '21 14:11 krsnik93