Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timezone offset doesn't work. #7958

Open
maltitco opened this issue Aug 1, 2019 · 19 comments
Open

Timezone offset doesn't work. #7958

maltitco opened this issue Aug 1, 2019 · 19 comments
Assignees
Labels
global:timezone Related to timezones good first issue Good first issues for new contributors .pinned Draws attention

Comments

@maltitco
Copy link

maltitco commented Aug 1, 2019

The "Timezone offset" doesn't work for the postergsql database.
I am trying to display a list of records for my local time, despite setting the offset to 2 hours I still have UTC time.

I tested two ways to install the superset: using Docker and local development installation.

Edit:
I also tested this for example data that can be initiated by installing a superset.
Timezone offset setting for the flight table also does not shift time from UTC to my local.

@issue-label-bot issue-label-bot bot added the !deprecated-label:bug Deprecated label - Use #bug instead label Aug 1, 2019
@ericandrewmeadows
Copy link
Contributor

@maltitco - which version are you running? Have you been able to test this on v0.33.0rc1?

@viveksatasiya
Copy link

I have also found same issue. I have configured time offset into data source configuration to 11(Australia/Melbourne). After configuration, still I am not able to get the data according to the time offset. I am using druid cluster.

@maltitco
Copy link
Author

@ericandrewmeadows version from git in file superset/assets/package.json is "0.999.0dev"
@viveksatasiya I am using the postgresql database and as a workaround, I set my time zone for the user connecting to the database

@viveksatasiya
Copy link

@maltitco how to do it with the druid cluster?

@stale
Copy link

stale bot commented Dec 13, 2019

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 stale bot added the inactive Inactive for >= 30 days label Dec 13, 2019
@maltitco
Copy link
Author

@viveksatasiya i don't use druid cluster.

@stale stale bot removed the inactive Inactive for >= 30 days label Dec 13, 2019
@TheRum
Copy link
Contributor

TheRum commented Dec 23, 2019

Any Update on this !

@stale
Copy link

stale bot commented Feb 21, 2020

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 stale bot added the inactive Inactive for >= 30 days label Feb 21, 2020
@stale stale bot closed this as completed Feb 28, 2020
@jiade52000
Copy link

update! I have found the same issue. T.T

@junlincc junlincc removed the inactive Inactive for >= 30 days label Feb 7, 2021
@junlincc junlincc reopened this Feb 7, 2021
@junlincc junlincc added global:timezone Related to timezones .pinned Draws attention labels Feb 7, 2021
@junlincc junlincc self-assigned this Feb 7, 2021
@apache apache deleted a comment from issue-label-bot bot Feb 8, 2021
@poleft
Copy link

poleft commented Mar 5, 2021

found the same issue, too.

@junlincc junlincc added the good first issue Good first issues for new contributors label Mar 31, 2021
@skymarstroy
Copy link

found the same issue, too.

@graceguo-supercat graceguo-supercat removed the !deprecated-label:bug Deprecated label - Use #bug instead label Mar 16, 2022
@waqasakramef
Copy link

found the same issue, too.

@raowaqasakram
Copy link

Still facing the same issue.

@rusackas
Copy link
Member

@zhaoyongjie if I recall correctly, you were just mentioning a timezone offset issue you spotted. Is that related to this bug, which incidentally our very oldest open bug report? 🤞

@manojsahukar
Copy link

Why the Hours offset doesn't support float values? I need float values for IST (+5:30)

@alex1404
Copy link

+1
why it's not working for float values

@irisjae
Copy link

irisjae commented Jan 2, 2024

A workaround is alter role <superset-role> set time zone <my-time-zone>; for the role used in the superset data connection, so that date_trunc etc used in charts are against local time.

@rusackas
Copy link
Member

rusackas commented Feb 1, 2024

@john-bodley you have any context on this? The issue is an antique, but seemingly ever-present.

@john-bodley
Copy link
Member

john-bodley commented Feb 1, 2024

@rusackas no I don't and I'm not well educated in the PostgreSQL space.

Would someone be able to provide a concrete example (with SQL and possibly screenshots) of the exact problem? I know timezones can be tricky and I'm not overly sure how well they are supported in Superset (for context at Airbnb our data is encoded at UTC and thus we likely haven't experienced any time zone offset quirks).

To further complicate things the underlying DB-API needs to handle timezones as well as I suspect not all do. I previously added this document which highlights a slew of headaches when dealing with timezones, if that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
global:timezone Related to timezones good first issue Good first issues for new contributors .pinned Draws attention
Projects
None yet
Development

No branches or pull requests