{"action":"created","comment":{"url":"https://api.github.com/repos/mattermost/mattermost-server/pulls/comments/173543749","pull_request_review_id":102759895,"id":173543749,"diff_hunk":"@@ -0,0 +1,26 @@\n+// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.\n+// See License.txt for license information.\n+\n+package api4\n+\n+import (\n+\t\"net/http\"\n+\n+\t\"github.com/mattermost/mattermost-server/model\"\n+)\n+\n+func (api *API) InitTimezone() {\n+\tapi.BaseRoutes.Timezones.Handle(\"\", api.ApiSessionRequired(getSupportedTimezones)).Methods(\"GET\")\n+}\n+\n+func getSupportedTimezones(c *Context, w http.ResponseWriter, r *http.Request) {\n+\tsupportedTimezones := c.App.Config().SupportedTimezones\n+\n+\tif len(supportedTimezones) == 0 {\n+\t\temptyTimezones := make([]string, 0)\n+\t\tw.Write([]byte(model.TimezonesToJson(emptyTimezones)))\n+\t\treturn\n+\t}\n+\n+\tw.Write([]byte(model.TimezonesToJson(supportedTimezones)))\n+}","path":"api4/timezone.go","position":26,"original_position":26,"commit_id":"95ecb9105186bd0961124cef8654138f19e2f436","original_commit_id":"95ecb9105186bd0961124cef8654138f19e2f436","user":{"login":"jwilander","id":2672098,"avatar_url":"https://avatars0.githubusercontent.com/u/2672098?v=4","gravatar_id":"","url":"https://api.github.com/users/jwilander","html_url":"https://github.com/jwilander","followers_url":"https://api.github.com/users/jwilander/followers","following_url":"https://api.github.com/users/jwilander/following{/other_user}","gists_url":"https://api.github.com/users/jwilander/gists{/gist_id}","starred_url":"https://api.github.com/users/jwilander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwilander/subscriptions","organizations_url":"https://api.github.com/users/jwilander/orgs","repos_url":"https://api.github.com/users/jwilander/repos","events_url":"https://api.github.com/users/jwilander/events{/privacy}","received_events_url":"https://api.github.com/users/jwilander/received_events","type":"User","site_admin":false},"body":"Could we throw this under the `/api/v4/system` route? I think it fits there better than having it's own root path","created_at":"2018-03-09T19:22:50Z","updated_at":"2018-03-09T19:23:30Z","html_url":"https://github.com/mattermost/mattermost-server/pull/8185#discussion_r173543749","pull_request_url":"https://api.github.com/repos/mattermost/mattermost-server/pulls/8185","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/mattermost/mattermost-server/pulls/comments/173543749"},"html":{"href":"https://github.com/mattermost/mattermost-server/pull/8185#discussion_r173543749"},"pull_request":{"href":"https://api.github.com/repos/mattermost/mattermost-server/pulls/8185"}}},"pull_request":{"url":"https://api.github.com/repos/mattermost/mattermost-server/pulls/8185","id":166682738,"html_url":"https://github.com/mattermost/mattermost-server/pull/8185","diff_url":"https://github.com/mattermost/mattermost-server/pull/8185.diff","patch_url":"https://github.com/mattermost/mattermost-server/pull/8185.patch","issue_url":"https://api.github.com/repos/mattermost/mattermost-server/issues/8185","number":8185,"state":"open","locked":false,"title":"Timezone feature","user":{"login":"csduarte","id":9515253,"avatar_url":"https://avatars3.githubusercontent.com/u/9515253?v=4","gravatar_id":"","url":"https://api.github.com/users/csduarte","html_url":"https://github.com/csduarte","followers_url":"https://api.github.com/users/csduarte/followers","following_url":"https://api.github.com/users/csduarte/following{/other_user}","gists_url":"https://api.github.com/users/csduarte/gists{/gist_id}","starred_url":"https://api.github.com/users/csduarte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csduarte/subscriptions","organizations_url":"https://api.github.com/users/csduarte/orgs","repos_url":"https://api.github.com/users/csduarte/repos","events_url":"https://api.github.com/users/csduarte/events{/privacy}","received_events_url":"https://api.github.com/users/csduarte/received_events","type":"User","site_admin":false},"body":"#### Summary\r\n1. Supply `SupportedTimezones` via config to clients\r\n2. Update PatchUser logic to update Timezones\r\n\r\n#### Ticket Link\r\n[PLT-541 Add a \"Time zone\" field to account settings - Mattermost](https://mattermost.atlassian.net/browse/PLT-541)\r\n\r\n#### Checklist\r\n[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]\r\n- [x] Added or updated unit tests (required for all new features)\r\n- [x] Has UI changes","created_at":"2018-02-01T23:41:52Z","updated_at":"2018-03-09T19:23:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ceb4f3b3409e42ac6598cc2da3c8916a9bc016de","assignee":{"login":"hmhealey","id":3277310,"avatar_url":"https://avatars3.githubusercontent.com/u/3277310?v=4","gravatar_id":"","url":"https://api.github.com/users/hmhealey","html_url":"https://github.com/hmhealey","followers_url":"https://api.github.com/users/hmhealey/followers","following_url":"https://api.github.com/users/hmhealey/following{/other_user}","gists_url":"https://api.github.com/users/hmhealey/gists{/gist_id}","starred_url":"https://api.github.com/users/hmhealey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmhealey/subscriptions","organizations_url":"https://api.github.com/users/hmhealey/orgs","repos_url":"https://api.github.com/users/hmhealey/repos","events_url":"https://api.github.com/users/hmhealey/events{/privacy}","received_events_url":"https://api.github.com/users/hmhealey/received_events","type":"User","site_admin":false},"assignees":[{"login":"hmhealey","id":3277310,"avatar_url":"https://avatars3.githubusercontent.com/u/3277310?v=4","gravatar_id":"","url":"https://api.github.com/users/hmhealey","html_url":"https://github.com/hmhealey","followers_url":"https://api.github.com/users/hmhealey/followers","following_url":"https://api.github.com/users/hmhealey/following{/other_user}","gists_url":"https://api.github.com/users/hmhealey/gists{/gist_id}","starred_url":"https://api.github.com/users/hmhealey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmhealey/subscriptions","organizations_url":"https://api.github.com/users/hmhealey/orgs","repos_url":"https://api.github.com/users/hmhealey/repos","events_url":"https://api.github.com/users/hmhealey/events{/privacy}","received_events_url":"https://api.github.com/users/hmhealey/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":250214574,"url":"https://api.github.com/repos/mattermost/mattermost-server/labels/2:%20Dev%20Review","name":"2: Dev Review","color":"eb6420","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/mattermost/mattermost-server/pulls/8185/commits","review_comments_url":"https://api.github.com/repos/mattermost/mattermost-server/pulls/8185/comments","review_comment_url":"https://api.github.com/repos/mattermost/mattermost-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mattermost/mattermost-server/issues/8185/comments","statuses_url":"https://api.github.com/repos/mattermost/mattermost-server/statuses/95ecb9105186bd0961124cef8654138f19e2f436","head":{"label":"uber-uchat:timezone-feature","ref":"timezone-feature","sha":"95ecb9105186bd0961124cef8654138f19e2f436","user":{"login":"uber-uchat","id":31258996,"avatar_url":"https://avatars0.githubusercontent.com/u/31258996?v=4","gravatar_id":"","url":"https://api.github.com/users/uber-uchat","html_url":"https://github.com/uber-uchat","followers_url":"https://api.github.com/users/uber-uchat/followers","following_url":"https://api.github.com/users/uber-uchat/following{/other_user}","gists_url":"https://api.github.com/users/uber-uchat/gists{/gist_id}","starred_url":"https://api.github.com/users/uber-uchat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber-uchat/subscriptions","organizations_url":"https://api.github.com/users/uber-uchat/orgs","repos_url":"https://api.github.com/users/uber-uchat/repos","events_url":"https://api.github.com/users/uber-uchat/events{/privacy}","received_events_url":"https://api.github.com/users/uber-uchat/received_events","type":"Organization","site_admin":false},"repo":{"id":104518581,"name":"mattermost-server","full_name":"uber-uchat/mattermost-server","owner":{"login":"uber-uchat","id":31258996,"avatar_url":"https://avatars0.githubusercontent.com/u/31258996?v=4","gravatar_id":"","url":"https://api.github.com/users/uber-uchat","html_url":"https://github.com/uber-uchat","followers_url":"https://api.github.com/users/uber-uchat/followers","following_url":"https://api.github.com/users/uber-uchat/following{/other_user}","gists_url":"https://api.github.com/users/uber-uchat/gists{/gist_id}","starred_url":"https://api.github.com/users/uber-uchat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber-uchat/subscriptions","organizations_url":"https://api.github.com/users/uber-uchat/orgs","repos_url":"https://api.github.com/users/uber-uchat/repos","events_url":"https://api.github.com/users/uber-uchat/events{/privacy}","received_events_url":"https://api.github.com/users/uber-uchat/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber-uchat/mattermost-server","description":"Open source Slack-alternative in Golang and React - Mattermost","fork":true,"url":"https://api.github.com/repos/uber-uchat/mattermost-server","forks_url":"https://api.github.com/repos/uber-uchat/mattermost-server/forks","keys_url":"https://api.github.com/repos/uber-uchat/mattermost-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber-uchat/mattermost-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber-uchat/mattermost-server/teams","hooks_url":"https://api.github.com/repos/uber-uchat/mattermost-server/hooks","issue_events_url":"https://api.github.com/repos/uber-uchat/mattermost-server/issues/events{/number}","events_url":"https://api.github.com/repos/uber-uchat/mattermost-server/events","assignees_url":"https://api.github.com/repos/uber-uchat/mattermost-server/assignees{/user}","branches_url":"https://api.github.com/repos/uber-uchat/mattermost-server/branches{/branch}","tags_url":"https://api.github.com/repos/uber-uchat/mattermost-server/tags","blobs_url":"https://api.github.com/repos/uber-uchat/mattermost-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber-uchat/mattermost-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber-uchat/mattermost-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber-uchat/mattermost-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber-uchat/mattermost-server/statuses/{sha}","languages_url":"https://api.github.com/repos/uber-uchat/mattermost-server/languages","stargazers_url":"https://api.github.com/repos/uber-uchat/mattermost-server/stargazers","contributors_url":"https://api.github.com/repos/uber-uchat/mattermost-server/contributors","subscribers_url":"https://api.github.com/repos/uber-uchat/mattermost-server/subscribers","subscription_url":"https://api.github.com/repos/uber-uchat/mattermost-server/subscription","commits_url":"https://api.github.com/repos/uber-uchat/mattermost-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber-uchat/mattermost-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber-uchat/mattermost-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber-uchat/mattermost-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber-uchat/mattermost-server/contents/{+path}","compare_url":"https://api.github.com/repos/uber-uchat/mattermost-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber-uchat/mattermost-server/merges","archive_url":"https://api.github.com/repos/uber-uchat/mattermost-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber-uchat/mattermost-server/downloads","issues_url":"https://api.github.com/repos/uber-uchat/mattermost-server/issues{/number}","pulls_url":"https://api.github.com/repos/uber-uchat/mattermost-server/pulls{/number}","milestones_url":"https://api.github.com/repos/uber-uchat/mattermost-server/milestones{/number}","notifications_url":"https://api.github.com/repos/uber-uchat/mattermost-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber-uchat/mattermost-server/labels{/name}","releases_url":"https://api.github.com/repos/uber-uchat/mattermost-server/releases{/id}","deployments_url":"https://api.github.com/repos/uber-uchat/mattermost-server/deployments","created_at":"2017-09-22T21:03:53Z","updated_at":"2018-02-09T20:45:01Z","pushed_at":"2018-03-09T16:25:41Z","git_url":"git://github.com/uber-uchat/mattermost-server.git","ssh_url":"git@github.com:uber-uchat/mattermost-server.git","clone_url":"https://github.com/uber-uchat/mattermost-server.git","svn_url":"https://github.com/uber-uchat/mattermost-server","homepage":"https://mattermost.com","size":271207,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"mattermost:master","ref":"master","sha":"426796829a4a1436c4733ee856d033c02749e64b","user":{"login":"mattermost","id":9828093,"avatar_url":"https://avatars1.githubusercontent.com/u/9828093?v=4","gravatar_id":"","url":"https://api.github.com/users/mattermost","html_url":"https://github.com/mattermost","followers_url":"https://api.github.com/users/mattermost/followers","following_url":"https://api.github.com/users/mattermost/following{/other_user}","gists_url":"https://api.github.com/users/mattermost/gists{/gist_id}","starred_url":"https://api.github.com/users/mattermost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattermost/subscriptions","organizations_url":"https://api.github.com/users/mattermost/orgs","repos_url":"https://api.github.com/users/mattermost/repos","events_url":"https://api.github.com/users/mattermost/events{/privacy}","received_events_url":"https://api.github.com/users/mattermost/received_events","type":"Organization","site_admin":false},"repo":{"id":37448451,"name":"mattermost-server","full_name":"mattermost/mattermost-server","owner":{"login":"mattermost","id":9828093,"avatar_url":"https://avatars1.githubusercontent.com/u/9828093?v=4","gravatar_id":"","url":"https://api.github.com/users/mattermost","html_url":"https://github.com/mattermost","followers_url":"https://api.github.com/users/mattermost/followers","following_url":"https://api.github.com/users/mattermost/following{/other_user}","gists_url":"https://api.github.com/users/mattermost/gists{/gist_id}","starred_url":"https://api.github.com/users/mattermost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattermost/subscriptions","organizations_url":"https://api.github.com/users/mattermost/orgs","repos_url":"https://api.github.com/users/mattermost/repos","events_url":"https://api.github.com/users/mattermost/events{/privacy}","received_events_url":"https://api.github.com/users/mattermost/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mattermost/mattermost-server","description":"Open source Slack-alternative in Golang and React - Mattermost","fork":false,"url":"https://api.github.com/repos/mattermost/mattermost-server","forks_url":"https://api.github.com/repos/mattermost/mattermost-server/forks","keys_url":"https://api.github.com/repos/mattermost/mattermost-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mattermost/mattermost-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mattermost/mattermost-server/teams","hooks_url":"https://api.github.com/repos/mattermost/mattermost-server/hooks","issue_events_url":"https://api.github.com/repos/mattermost/mattermost-server/issues/events{/number}","events_url":"https://api.github.com/repos/mattermost/mattermost-server/events","assignees_url":"https://api.github.com/repos/mattermost/mattermost-server/assignees{/user}","branches_url":"https://api.github.com/repos/mattermost/mattermost-server/branches{/branch}","tags_url":"https://api.github.com/repos/mattermost/mattermost-server/tags","blobs_url":"https://api.github.com/repos/mattermost/mattermost-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mattermost/mattermost-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mattermost/mattermost-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/mattermost/mattermost-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mattermost/mattermost-server/statuses/{sha}","languages_url":"https://api.github.com/repos/mattermost/mattermost-server/languages","stargazers_url":"https://api.github.com/repos/mattermost/mattermost-server/stargazers","contributors_url":"https://api.github.com/repos/mattermost/mattermost-server/contributors","subscribers_url":"https://api.github.com/repos/mattermost/mattermost-server/subscribers","subscription_url":"https://api.github.com/repos/mattermost/mattermost-server/subscription","commits_url":"https://api.github.com/repos/mattermost/mattermost-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/mattermost/mattermost-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/mattermost/mattermost-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/mattermost/mattermost-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/mattermost/mattermost-server/contents/{+path}","compare_url":"https://api.github.com/repos/mattermost/mattermost-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mattermost/mattermost-server/merges","archive_url":"https://api.github.com/repos/mattermost/mattermost-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mattermost/mattermost-server/downloads","issues_url":"https://api.github.com/repos/mattermost/mattermost-server/issues{/number}","pulls_url":"https://api.github.com/repos/mattermost/mattermost-server/pulls{/number}","milestones_url":"https://api.github.com/repos/mattermost/mattermost-server/milestones{/number}","notifications_url":"https://api.github.com/repos/mattermost/mattermost-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mattermost/mattermost-server/labels{/name}","releases_url":"https://api.github.com/repos/mattermost/mattermost-server/releases{/id}","deployments_url":"https://api.github.com/repos/mattermost/mattermost-server/deployments","created_at":"2015-06-15T06:50:02Z","updated_at":"2018-03-09T14:18:59Z","pushed_at":"2018-03-09T19:13:36Z","git_url":"git://github.com/mattermost/mattermost-server.git","ssh_url":"git@github.com:mattermost/mattermost-server.git","clone_url":"https://github.com/mattermost/mattermost-server.git","svn_url":"https://github.com/mattermost/mattermost-server","homepage":"https://mattermost.com","size":269516,"stargazers_count":11969,"watchers_count":11969,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2052,"mirror_url":null,"archived":false,"open_issues_count":110,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":2052,"open_issues":110,"watchers":11969,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mattermost/mattermost-server/pulls/8185"},"html":{"href":"https://github.com/mattermost/mattermost-server/pull/8185"},"issue":{"href":"https://api.github.com/repos/mattermost/mattermost-server/issues/8185"},"comments":{"href":"https://api.github.com/repos/mattermost/mattermost-server/issues/8185/comments"},"review_comments":{"href":"https://api.github.com/repos/mattermost/mattermost-server/pulls/8185/comments"},"review_comment":{"href":"https://api.github.com/repos/mattermost/mattermost-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mattermost/mattermost-server/pulls/8185/commits"},"statuses":{"href":"https://api.github.com/repos/mattermost/mattermost-server/statuses/95ecb9105186bd0961124cef8654138f19e2f436"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jwilander"}}