Replies: 31 comments 4 replies
-
I think that when you query Druid with timezone aware, e.g. Druid will give back result with this timestamps:
and pandas will convert them to UTC in any case (see https://github.com/apache/incubator-superset/blob/adc9a6b495d42c0e1d35dff5d79ef5534b77a320/superset/viz.py#L197-L241), therefore you need to convert back in the localtimezone, which is not done automatically. The only thing that it is done, it's using a an hour offset defined in the datasource properties, and applied here: |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply @srggrs I think it should accept float value. or |
Beta Was this translation helpful? Give feedback.
-
@Manoj1881 I am also having same issue. Did you find any workaround to this ? |
Beta Was this translation helpful? Give feedback.
-
Same issue, is there any way to change superset timezone from the UI ? |
Beta Was this translation helpful? Give feedback.
-
+1 on this, timezones are important. |
Beta Was this translation helpful? Give feedback.
-
Agree. We have some edge cases were entities are associated to wrong days (leading to sometimes inaccurate metrics) because of this :/ |
Beta Was this translation helpful? Give feedback.
-
timezones are important |
Beta Was this translation helpful? Give feedback.
-
+1 Daylight savings causes issues where users have to update datasource timezone offset for each datasource twice per year. |
Beta Was this translation helpful? Give feedback.
-
Any solution for this? |
Beta Was this translation helpful? Give feedback.
-
+1 Would also hope to have some kind of UI element to allow the user to select a timezone, which is then used for any datetime handling and in the currently queried DB's context. |
Beta Was this translation helpful? Give feedback.
-
SELECT Does this solve your problem? |
Beta Was this translation helpful? Give feedback.
-
+1 |
Beta Was this translation helpful? Give feedback.
-
Use offset can temporarily solve this problem, the issue is that US has daylight saving. |
Beta Was this translation helpful? Give feedback.
-
+1, I am surprised this hasn't been resolved yet. |
Beta Was this translation helpful? Give feedback.
-
+1
This does mean that for data from different timezones you have to either use different datasources or you have to store this info in DB and fetch it so the date will be converted properly. Also, when using this trick having any date filter that ends with Now there is a possibility that data won't show up for a few hours so you will get delays. Adding a few hours to the end date works but it doesn't feel like a user friendly solution, especially people that have to work with the data from the dashboard. |
Beta Was this translation helpful? Give feedback.
-
I think this is super important. I think a lot of this is to power BI, which is difficult to do when if I set a chart up to show sales for the last day it shows last day in UTC... this issue is basically the only reason we can't use Superset at the moment over most other BI tools. I think this is something that just needs to be implemented in the UI. I do not think it needs to go any deeper than what is already there, if Dashboards could just translate time filters and queries from Local time to UTC and charts from UTC to local time then it would solve 90% of the issues. I see mention that DST would cause issues; however, browsers implement this just fine. Just translating the fields should do it nicely. |
Beta Was this translation helpful? Give feedback.
-
+1 any update on this? |
Beta Was this translation helpful? Give feedback.
-
I got reference for this issue that maybe could help. Apache Superset Backend TimezoneUnderstanding and configuring the timezone settings in Apache Superset's backend is crucial for ensuring data consistency across different components. Here's a comprehensive guide to help you navigate timezone configurations in Superset's backend. Timezone Configuration
Setting Backend TimezoneTo set the backend timezone in Apache Superset, follow these steps:
Handling Timezone in Data VisualizationWhen visualizing data, it's important to consider the timezone settings:
Best Practices
By following these guidelines, you can ensure that your Apache Superset instance handles timezones effectively, providing accurate and consistent temporal data across all visualizations and dashboards. Reference |
Beta Was this translation helpful? Give feedback.
-
Make sure these boxes are checked before submitting your issue - thank you!
Superset version
superset --version
Flask 0.12.4
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:04:33)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]
Expected results
querying from superset is still in UTC even after changing DRUID_TZ in config.py to DRUID_TZ = tz.tzlocal()
Beta Was this translation helpful? Give feedback.
All reactions