{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/comments/68276534","id":68276534,"diff_hunk":"@@ -62,6 +63,19 @@ def get_time_display(dtime, format_string=None, coerce_tz=None):\n         return get_default_time_display(dtime)\n \n \n+def get_formatted_time_zone(time_zone, option=None):\n+    \"\"\"\n+    Returns a formatted time zone (e.g. 'Asia/Tokyo (JST +0900)') for user account settings time zone drop down\n+    \"\"\"\n+    abbr = now().astimezone(timezone(time_zone)).strftime('%Z')\n+    offset = now().astimezone(timezone(time_zone)).strftime('%z')\n+    if option == 'abbr':\n+        return abbr\n+    elif option == 'offset':\n+        return offset\n+    return \"{name} ({abbr}, UTC{offset})\".format(name=time_zone, abbr=abbr, offset=offset).replace(\"_\", \" \")","path":"common/djangoapps/util/date_utils.py","position":33,"original_position":33,"commit_id":"8a9f8a380298e8fab7a3e91222e079124becdc42","original_commit_id":"8a9f8a380298e8fab7a3e91222e079124becdc42","user":{"login":"nasthagiri","id":6772826,"avatar_url":"https://avatars.githubusercontent.com/u/6772826?v=3","gravatar_id":"","url":"https://api.github.com/users/nasthagiri","html_url":"https://github.com/nasthagiri","followers_url":"https://api.github.com/users/nasthagiri/followers","following_url":"https://api.github.com/users/nasthagiri/following{/other_user}","gists_url":"https://api.github.com/users/nasthagiri/gists{/gist_id}","starred_url":"https://api.github.com/users/nasthagiri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nasthagiri/subscriptions","organizations_url":"https://api.github.com/users/nasthagiri/orgs","repos_url":"https://api.github.com/users/nasthagiri/repos","events_url":"https://api.github.com/users/nasthagiri/events{/privacy}","received_events_url":"https://api.github.com/users/nasthagiri/received_events","type":"User","site_admin":false},"body":"Can you explain why replacing `_` is needed?","created_at":"2016-06-23T17:20:50Z","updated_at":"2016-06-23T17:20:50Z","html_url":"https://github.com/edx/edx-platform/pull/12667#discussion_r68276534","pull_request_url":"https://api.github.com/repos/edx/edx-platform/pulls/12667","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments/68276534"},"html":{"href":"https://github.com/edx/edx-platform/pull/12667#discussion_r68276534"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/12667"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/12667","id":72722705,"html_url":"https://github.com/edx/edx-platform/pull/12667","diff_url":"https://github.com/edx/edx-platform/pull/12667.diff","patch_url":"https://github.com/edx/edx-platform/pull/12667.patch","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/12667","number":12667,"state":"open","locked":false,"title":"Time Zone in Account Settings","user":{"login":"kevinjkim","id":14193378,"avatar_url":"https://avatars.githubusercontent.com/u/14193378?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinjkim","html_url":"https://github.com/kevinjkim","followers_url":"https://api.github.com/users/kevinjkim/followers","following_url":"https://api.github.com/users/kevinjkim/following{/other_user}","gists_url":"https://api.github.com/users/kevinjkim/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinjkim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinjkim/subscriptions","organizations_url":"https://api.github.com/users/kevinjkim/orgs","repos_url":"https://api.github.com/users/kevinjkim/repos","events_url":"https://api.github.com/users/kevinjkim/events{/privacy}","received_events_url":"https://api.github.com/users/kevinjkim/received_events","type":"User","site_admin":false},"body":"Added time zone field to user account settings. Time zone is stored in preferences rather than the student model.\r\n\r\n### [TNL-4594](https://openedx.atlassian.net/browse/TNL-4594)\r\n\r\nBelow is what it looks like:\r\n![d6dc6e3e-2817-11e6-89fb-17785a03399d](https://cloud.githubusercontent.com/assets/14193378/15826225/bf796c68-2bd4-11e6-9a9a-fb6365c00471.png)\r\n\r\n\r\n### Sandbox\r\n- [ ] Build a sandbox for your branch and add a link here\r\n\r\n### Testing\r\n- [ ] i18n\r\n- [ ] RTL\r\n- [ ] safecommit shows 0 violations\r\n- [ ] Unit, integration, acceptance tests as appropriate\r\n- [ ] Analytics\r\n- [ ] Performance\r\n- [ ] Database migrations are backwards-compatible\r\n\r\n### Reviewers\r\nIf you've been tagged for review, please check your corresponding box once you've given the :+1:.\r\n- [ ] Code review: @jcdyer \r\n- [ ] Code review: @nasthagiri \r\n- [ ] UI strings/error msgs review: @catong \r\n- [ ] UX review: @chris-mike \r\n- [ ] Accessibility review: @cptvitamin \r\n- [ ] Product review: @sstack22 \r\n\r\n### Post-review\r\n- [ ] Squash commits","created_at":"2016-06-06T14:52:52Z","updated_at":"2016-06-23T17:20:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d484c5d806d6be642c2dfb9a422fd9e48110adb6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-platform/pulls/12667/commits","review_comments_url":"https://api.github.com/repos/edx/edx-platform/pulls/12667/comments","review_comment_url":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/12667/comments","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/8a9f8a380298e8fab7a3e91222e079124becdc42","head":{"label":"edx:kkim/tz_pref_AS","ref":"kkim/tz_pref_AS","sha":"8a9f8a380298e8fab7a3e91222e079124becdc42","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"The Open edX platform, the software that powers edX!","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","deployments_url":"https://api.github.com/repos/edx/edx-platform/deployments","created_at":"2013-05-30T20:20:38Z","updated_at":"2016-06-22T14:10:12Z","pushed_at":"2016-06-23T17:19:53Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://open.edx.org/","size":768384,"stargazers_count":2637,"watchers_count":2637,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1599,"mirror_url":null,"open_issues_count":177,"forks":1599,"open_issues":177,"watchers":2637,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"11fa2f371111d6ea1eb382467b5d7f1dbbb1d6ff","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"The Open edX platform, the software that powers edX!","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","deployments_url":"https://api.github.com/repos/edx/edx-platform/deployments","created_at":"2013-05-30T20:20:38Z","updated_at":"2016-06-22T14:10:12Z","pushed_at":"2016-06-23T17:19:53Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://open.edx.org/","size":768384,"stargazers_count":2637,"watchers_count":2637,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1599,"mirror_url":null,"open_issues_count":177,"forks":1599,"open_issues":177,"watchers":2637,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/12667"},"html":{"href":"https://github.com/edx/edx-platform/pull/12667"},"issue":{"href":"https://api.github.com/repos/edx/edx-platform/issues/12667"},"comments":{"href":"https://api.github.com/repos/edx/edx-platform/issues/12667/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/12667/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/12667/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-platform/statuses/8a9f8a380298e8fab7a3e91222e079124becdc42"}}}}
{"actor":{"display_login":"nasthagiri"}}