Issues with Druid timezones
As our Druid is in UTC, so it would be more accurate to query in UTC timezone.
From this line of code https://github.com/airbnb/caravel/blob/master/caravel/models.py#L1720. It's trying to convert to UTC. But It's trying to convert from UTC -> UTC instead of my local timezone which is EST.
For example, right now my local time is 15:06 EST and when I console the time out it's 2016-10-18 15:06:44 but that string is not timezone aware so after this conversion
from_dttm.replace(tzinfo=config.get("DRUID_TZ"))
My DRUID_TZ is tz.tzutc()
It stays as 2016-10-18 15:06:44 instead of 2016-10-18 19:06:44 which is the actual UTC timezone.
Not sure how to configure this in Caravel?
Those methods that named tzutc and tzlocal in tz work for me...
Oh no.. They are not working when i upgrade superset from v0.13.2 into v0.15.4, even if i try to use DRUID_TZ = tz.gettz('Asia/Shanghai') :-(
I'm using v0.15.2 and DRUID_TZ=tz.tzlocal() doesn't work. :-( How can I use local timezone in superset?
@JessicaDuan Hi, JessicaDuan. I have fixed some timezone problems in utils.py (https://github.com/airbnb/superset/pull/2370). If you meet the same situation, then you can try to add it.
I'm using v0.19.1, and change DRUID_TZ to tz.gettz('Asia/Shanghai'), Druid intervals is changed, add +08:00, but granularity timeZone is set to 'CST', which is not correct for Druid, timeZone should be set to 'Asia/Shanghai'.
The code is here models.py, timezone = from_dttm.tzname(), return 'CST' when set DRUID_TZ=tz.gettz('Asia/Shanghai').
@tkec,we encount the same problem, have you fix it? would you please share your solution ?
@LewissPan No, I don't know how to return 'Asia/Shanghai' in python. In my case, there is another dimension 'create_time', I use this dimension to group by, not use '__time', and change DRUID_TZ to tz.gettz('Asia/Shanghai'), then superset will use 'topN' to query data, intervals is added +8:00.
the referenced https://github.com/apache/incubator-superset/pull/2370 was closed instead of being merged, @asdf2014 Is this still an issue or fixed by some other PR ?
Notice: this issue has been closed because it has been inactive for 221 days. Feel free to comment and request for this issue to be reopened.
Having this issue again in 1.4.1. DRUID_TZ does nothing.
Any solution for this?? @xrmx some bugs can't be resolved even after 8 years😂