{"action":"created","issue":{"url":"https://api.github.com/repos/metabase/metabase/issues/3584","repository_url":"https://api.github.com/repos/metabase/metabase","labels_url":"https://api.github.com/repos/metabase/metabase/issues/3584/labels{/name}","comments_url":"https://api.github.com/repos/metabase/metabase/issues/3584/comments","events_url":"https://api.github.com/repos/metabase/metabase/issues/3584/events","html_url":"https://github.com/metabase/metabase/issues/3584","id":183150682,"number":3584,"title":"Timezone issue with MYSQL","user":{"login":"pdiniz13","id":9104109,"avatar_url":"https://avatars.githubusercontent.com/u/9104109?v=3","gravatar_id":"","url":"https://api.github.com/users/pdiniz13","html_url":"https://github.com/pdiniz13","followers_url":"https://api.github.com/users/pdiniz13/followers","following_url":"https://api.github.com/users/pdiniz13/following{/other_user}","gists_url":"https://api.github.com/users/pdiniz13/gists{/gist_id}","starred_url":"https://api.github.com/users/pdiniz13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdiniz13/subscriptions","organizations_url":"https://api.github.com/users/pdiniz13/orgs","repos_url":"https://api.github.com/users/pdiniz13/repos","events_url":"https://api.github.com/users/pdiniz13/events{/privacy}","received_events_url":"https://api.github.com/users/pdiniz13/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/metabase/metabase/labels/Database/MySQL","name":"Database/MySQL","color":"782E53"},{"url":"https://api.github.com/repos/metabase/metabase/labels/Timezones","name":"Timezones","color":"9E2E67"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-14T21:07:49Z","updated_at":"2016-10-15T00:35:48Z","closed_at":null,"body":"I'm not sure if this is a feature request or a bug. We are currently using MySQL as our database and our timestamps are saved as datetime fields in the database. When displaying the results with those fields included metabase has no issues converting those fields into PST time which we set in settings. The problem occurs when we try to filter by a datetime field. There doesn't seem to be any timezone conversion and the selected filter is added without being converted from pst to utc. As an example if I tried to select items by using today (PST time) as the filter(same thing happens for both relative and exact date searched) I would instead get orders that were booked between yesterday at 5pm until today at 5pm. This issue doesn't happen with hardcoded sql, even with params, because I can force a tz conversion on those values. But for things such as the dashboard and questions generated via the form there seems to be no solution. Again i'm not sure if this is a bug or if the driver was intended to work this way, but if there's some sort of workaround that you guys can point me too it would be greatly appreciated. Even if it involves just pointing to the area of the code where i could add the filter by default to those values in a forked repo it would help a lot.\r\n\r\n\r\n### Feature requests and proposals\r\n### Bugs\r\n- Your browser and the version: Chrome(latest), Firefox(latest). This issue is not browser related.\r\n- Your operating system: Machine running metabase is running on ubuntu.\r\n- Your databases: MySQL\r\n- Metabase version: (e.x. 0.20.0)\r\n- Metabase hosting environment: Docker DC/OS\r\n- Metabase internal database: Postgres\r\n\r\n- *Repeatable steps to reproduce the issue*\r\nAdd a mysql table with a datetime field in UTC, and try to filter the results based on that datetime filter.\r\n\r\n\r\nThanks for being part of the Metabase project!\r\n-------\r\n"},"comment":{"url":"https://api.github.com/repos/metabase/metabase/issues/comments/253950215","html_url":"https://github.com/metabase/metabase/issues/3584#issuecomment-253950215","issue_url":"https://api.github.com/repos/metabase/metabase/issues/3584","id":253950215,"user":{"login":"camsaul","id":1455846,"avatar_url":"https://avatars.githubusercontent.com/u/1455846?v=3","gravatar_id":"","url":"https://api.github.com/users/camsaul","html_url":"https://github.com/camsaul","followers_url":"https://api.github.com/users/camsaul/followers","following_url":"https://api.github.com/users/camsaul/following{/other_user}","gists_url":"https://api.github.com/users/camsaul/gists{/gist_id}","starred_url":"https://api.github.com/users/camsaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camsaul/subscriptions","organizations_url":"https://api.github.com/users/camsaul/orgs","repos_url":"https://api.github.com/users/camsaul/repos","events_url":"https://api.github.com/users/camsaul/events{/privacy}","received_events_url":"https://api.github.com/users/camsaul/received_events","type":"User","site_admin":false},"created_at":"2016-10-15T00:35:48Z","updated_at":"2016-10-15T00:35:48Z","body":"Did you set a \"Report Timezone\" in the Admin panel?"}}
{"actor":{"display_login":"camsaul"}}