{"action":"created","issue":{"url":"https://api.github.com/repos/druid-io/druid/issues/4126","repository_url":"https://api.github.com/repos/druid-io/druid","labels_url":"https://api.github.com/repos/druid-io/druid/issues/4126/labels{/name}","comments_url":"https://api.github.com/repos/druid-io/druid/issues/4126/comments","events_url":"https://api.github.com/repos/druid-io/druid/issues/4126/events","html_url":"https://github.com/druid-io/druid/issues/4126","id":217831321,"number":4126,"title":"Druid return random timezones when using a non-UTC timezone","user":{"login":"erikdubbelboer","id":522870,"avatar_url":"https://avatars0.githubusercontent.com/u/522870?v=3","gravatar_id":"","url":"https://api.github.com/users/erikdubbelboer","html_url":"https://github.com/erikdubbelboer","followers_url":"https://api.github.com/users/erikdubbelboer/followers","following_url":"https://api.github.com/users/erikdubbelboer/following{/other_user}","gists_url":"https://api.github.com/users/erikdubbelboer/gists{/gist_id}","starred_url":"https://api.github.com/users/erikdubbelboer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikdubbelboer/subscriptions","organizations_url":"https://api.github.com/users/erikdubbelboer/orgs","repos_url":"https://api.github.com/users/erikdubbelboer/repos","events_url":"https://api.github.com/users/erikdubbelboer/events{/privacy}","received_events_url":"https://api.github.com/users/erikdubbelboer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2017-03-29T10:25:49Z","updated_at":"2017-06-29T09:51:00Z","closed_at":null,"body":"After updating to `druid-0.10.0-rc2` we are seeing druid return random timezones. This only seems to happen when we use a different timezone than UTC.\r\n\r\nWhich rows have these random timezones changes every time the report is re-run.\r\n\r\nIn theory the time is not wrong as the hour changes accordingly but seeing that this happens randomly I'm pretty sure this is undesired behavior.\r\n\r\nThe query we run is:\r\n```json\r\n{\r\n  \"aggregations\": [\r\n    { \r\n      \"fieldName\": \"requests\",\r\n      \"name\": \"impressions\",\r\n      \"type\": \"longSum\"\r\n    }\r\n  ],\r\n  \"context\": {\r\n    \"queryId\": \"0fac7c63-3450-4d75-a160-ea0b99a37751\"\r\n  },\r\n  \"dataSource\": \"requests\",\r\n  \"granularity\": {\r\n    \"period\": \"P1D\",\r\n    \"timeZone\": \"CET\",\r\n    \"type\": \"period\"\r\n  },\r\n  \"intervals\": \"2017-03-14T23:00:00+00:00/2017-03-28T22:00:00+00:00\",\r\n  \"queryType\": \"groupBy\"\r\n}\r\n```\r\n\r\nMost of the rows in the result have a normal `Z` (UTC) timezone:\r\n```json\r\n...\r\n}, {\r\n  \"version\" : \"v1\",\r\n  \"timestamp\" : \"2017-03-16T23:00:00.000Z\",\r\n  \"event\" : {\r\n    \"impressions\" : 1042682811\r\n  }\r\n}, {\r\n  \"version\" : \"v1\",\r\n  \"timestamp\" : \"2017-03-17T23:00:00.000Z\",\r\n  \"event\" : {\r\n    \"impressions\" : 1130282706\r\n  }\r\n}, {\r\n  \"version\" : \"v1\",\r\n  \"timestamp\" : \"2017-03-18T23:00:00.000Z\",\r\n  \"event\" : {\r\n    \"impressions\" : 1141155536\r\n  }\r\n}, {\r\n```\r\n\r\nBut sometimes random rows have a `+01:00` offset:\r\n```json\r\n...\r\n}, {\r\n  \"version\" : \"v1\",\r\n  \"timestamp\" : \"2017-03-22T23:00:00.000Z\",\r\n  \"event\" : {\r\n    \"impressions\" : 856029534\r\n  }\r\n}, {\r\n  \"version\" : \"v1\",\r\n  \"timestamp\" : \"2017-03-24T00:00:00.000+01:00\",\r\n  \"event\" : {\r\n    \"impressions\" : 835172754\r\n  }\r\n}, {\r\n  \"version\" : \"v1\",\r\n  \"timestamp\" : \"2017-03-24T23:00:00.000Z\",\r\n  \"event\" : {\r\n    \"impressions\" : 833168201\r\n  }\r\n}, {\r\n```\r\n\r\nAnd even less times but still randomly some rows will even get a `+02:00` timezone **which them seems to use an incorrect hour**:\r\n```json\r\n...\r\n}, {\r\n  \"version\" : \"v1\",\r\n  \"timestamp\" : \"2017-03-25T23:00:00.000Z\",\r\n  \"event\" : {\r\n    \"impressions\" : 733111118\r\n  }\r\n}, {\r\n  \"version\" : \"v1\",\r\n  \"timestamp\" : \"2017-03-27T00:00:00.000+02:00\",\r\n  \"event\" : {\r\n    \"impressions\" : 772247551\r\n  }\r\n}, {\r\n  \"version\" : \"v1\",\r\n  \"timestamp\" : \"2017-03-27T22:00:00.000Z\",\r\n  \"event\" : {\r\n    \"impressions\" : 834563685\r\n  }\r\n} ]\r\n```\r\nOr\r\n```json\r\n}, {\r\n  \"version\" : \"v1\",\r\n  \"timestamp\" : \"2017-03-24T23:00:00.000Z\",\r\n  \"event\" : {\r\n    \"impressions\" : 833168201\r\n  }\r\n}, {\r\n  \"version\" : \"v1\",\r\n  \"timestamp\" : \"2017-03-26T00:00:00.000+01:00\",\r\n  \"event\" : {\r\n    \"impressions\" : 733111118\r\n  }\r\n}, {\r\n  \"version\" : \"v1\",\r\n  \"timestamp\" : \"2017-03-27T00:00:00.000+02:00\",\r\n  \"event\" : {\r\n    \"impressions\" : 772247551\r\n  }\r\n}, {\r\n  \"version\" : \"v1\",\r\n  \"timestamp\" : \"2017-03-28T00:00:00.000+02:00\",\r\n  \"event\" : {\r\n    \"impressions\" : 834563685\r\n  }\r\n} ]\r\n```"},"comment":{"url":"https://api.github.com/repos/druid-io/druid/issues/comments/311918653","html_url":"https://github.com/druid-io/druid/issues/4126#issuecomment-311918653","issue_url":"https://api.github.com/repos/druid-io/druid/issues/4126","id":311918653,"user":{"login":"jihoonson","id":2322288,"avatar_url":"https://avatars0.githubusercontent.com/u/2322288?v=3","gravatar_id":"","url":"https://api.github.com/users/jihoonson","html_url":"https://github.com/jihoonson","followers_url":"https://api.github.com/users/jihoonson/followers","following_url":"https://api.github.com/users/jihoonson/following{/other_user}","gists_url":"https://api.github.com/users/jihoonson/gists{/gist_id}","starred_url":"https://api.github.com/users/jihoonson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jihoonson/subscriptions","organizations_url":"https://api.github.com/users/jihoonson/orgs","repos_url":"https://api.github.com/users/jihoonson/repos","events_url":"https://api.github.com/users/jihoonson/events{/privacy}","received_events_url":"https://api.github.com/users/jihoonson/received_events","type":"User","site_admin":false},"created_at":"2017-06-29T09:51:00Z","updated_at":"2017-06-29T09:51:00Z","body":"@erikdubbelboer I tried to reproduce the bug, but your data set contains the rows of the same timestamp which makes difficult to reproduce. I think the best for us is a unit test which can reproduce the bug as @gianm said."}}
{"actor":{"display_login":"jihoonson"}}