Skip to content

Commit

Permalink
Pass timezone to Druid Query granularity (apache#4648)
Browse files Browse the repository at this point in the history
superset appends DRUID_TZ info to intervals but not to granularity which causes one day's data return as 2 days. This fix is also pass DRUID_TZ to granularity.
  • Loading branch information
ktong authored and timifasubaa committed May 31, 2018
1 parent 64abd9d commit 581f428
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/connectors/druid/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ def run_query( # noqa / druid
inner_from_dttm = inner_from_dttm or from_dttm
inner_to_dttm = inner_to_dttm or to_dttm

timezone = from_dttm.tzname() if from_dttm else None
timezone = from_dttm.replace(tzinfo=DRUID_TZ).tzname() if from_dttm else None

query_str = ''
metrics_dict = {m.metric_name: m for m in self.metrics}
Expand Down

0 comments on commit 581f428

Please sign in to comment.