You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/01/31 22:25:25 UTC

[GitHub] srggrs commented on issue #6768: config superset for local time zone?

srggrs commented on issue #6768: config superset for local time zone?
URL: https://github.com/apache/incubator-superset/issues/6768#issuecomment-459530326
 
 
   I think that when you query Druid with timezone aware, e.g.
   `{
   "granularity": {
       "type": "period",
       "timeZone": "Australia/Sydney",
       "period": "P1D"
     },
   "intervals": "2019-01-25T00:00:00+11:00/2019-02-01T00:00:00+11:00"
   }`
   
   Druid will give back result with this timestamps:
   
   > 2019-01-25T00:00:00+11:00 xxxxx
   2019-01-26T00:00:00+11:00 xxxxx
   ...
   
   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:
   https://github.com/apache/incubator-superset/blob/adc9a6b495d42c0e1d35dff5d79ef5534b77a320/superset/connectors/druid/models.py#L1308-L1330

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org