{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/comments/42831148","id":42831148,"diff_hunk":"@@ -3351,12 +3364,25 @@ amodem_addTimeUpdate( AModem  modem )\n     * and deal with this case (since it normally relied on the operator's country code\n     * which is hard to simulate on a general-purpose computer\n     */\n-    amodem_add_line( modem, \"%%CTZV: %02d/%02d/%02d:%02d:%02d:%02d%c%d:%d:%s\\r\\n\",\n-             (utc.tm_year + 1900) % 100, utc.tm_mon + 1, utc.tm_mday,\n-             utc.tm_hour, utc.tm_min, utc.tm_sec,\n-             (tzdiff >= 0) ? '+' : '-', (tzdiff >= 0 ? tzdiff : -tzdiff) / 15,\n-             (local.tm_isdst > 0),\n-             tzname );\n+    amodem_add_cvtz_line(modem, &utc, &local, tzdiff, tzname);\n+}\n+\n+/**\n+ * Update the NITZ timezone to tzdiff from UTC in number of quarter-hours.\n+ */\n+void\n+amodem_set_timezone( AModem modem, int tzdiff )\n+{\n+    time_t       utc_now = time(NULL);\n+    time_t       local_now = utc_now + tzdiff * 15 * 60;\n+    struct tm    utc, local;\n+\n+    utc   = *gmtime( &utc_now );\n+    local = *gmtime( &local_now );\n+\n+    amodem_begin_line( modem );\n+    amodem_add_cvtz_line(modem, &utc, &local, tzdiff, \"Unknown/Unknown\");","path":"telephony/android_modem.c","position":56,"original_position":56,"commit_id":"47539b2676db4c32b7586350b5c35abd7815b142","original_commit_id":"47539b2676db4c32b7586350b5c35abd7815b142","user":{"login":"EdgarChen","id":2723528,"avatar_url":"https://avatars.githubusercontent.com/u/2723528?v=3","gravatar_id":"","url":"https://api.github.com/users/EdgarChen","html_url":"https://github.com/EdgarChen","followers_url":"https://api.github.com/users/EdgarChen/followers","following_url":"https://api.github.com/users/EdgarChen/following{/other_user}","gists_url":"https://api.github.com/users/EdgarChen/gists{/gist_id}","starred_url":"https://api.github.com/users/EdgarChen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EdgarChen/subscriptions","organizations_url":"https://api.github.com/users/EdgarChen/orgs","repos_url":"https://api.github.com/users/EdgarChen/repos","events_url":"https://api.github.com/users/EdgarChen/events{/privacy}","received_events_url":"https://api.github.com/users/EdgarChen/received_events","type":"User","site_admin":false},"body":"In [line#3348](https://github.com/mozilla-b2g/platform_external_qemu/pull/162/files?diff=split#diff-58bd35ac9e1da86dffbc1dd35cd1ccc0L3335), we replace every '/' in the timezone name by '!'. Do we need to do the same replacement here, although neither rild nor gecko reads this timezone name actually?","created_at":"2015-10-23T03:49:43Z","updated_at":"2015-10-23T03:49:43Z","html_url":"https://github.com/mozilla-b2g/platform_external_qemu/pull/162#discussion_r42831148","pull_request_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/162","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/comments/42831148"},"html":{"href":"https://github.com/mozilla-b2g/platform_external_qemu/pull/162#discussion_r42831148"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/162"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/162","id":47005207,"html_url":"https://github.com/mozilla-b2g/platform_external_qemu/pull/162","diff_url":"https://github.com/mozilla-b2g/platform_external_qemu/pull/162.diff","patch_url":"https://github.com/mozilla-b2g/platform_external_qemu/pull/162.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/issues/162","number":162,"state":"open","locked":false,"title":"Bug 1212238 - add \"gsm timezone\" console command.","user":{"login":"freesamael","id":1597103,"avatar_url":"https://avatars.githubusercontent.com/u/1597103?v=3","gravatar_id":"","url":"https://api.github.com/users/freesamael","html_url":"https://github.com/freesamael","followers_url":"https://api.github.com/users/freesamael/followers","following_url":"https://api.github.com/users/freesamael/following{/other_user}","gists_url":"https://api.github.com/users/freesamael/gists{/gist_id}","starred_url":"https://api.github.com/users/freesamael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freesamael/subscriptions","organizations_url":"https://api.github.com/users/freesamael/orgs","repos_url":"https://api.github.com/users/freesamael/repos","events_url":"https://api.github.com/users/freesamael/events{/privacy}","received_events_url":"https://api.github.com/users/freesamael/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-07T09:35:10Z","updated_at":"2015-10-23T03:49:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3f06ec8e9a5ce1baa88b8eea0149bf73fec6fa32","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/162/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/162/comments","review_comment_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/issues/162/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/statuses/47539b2676db4c32b7586350b5c35abd7815b142","head":{"label":"freesamael:bz/1212238","ref":"bz/1212238","sha":"47539b2676db4c32b7586350b5c35abd7815b142","user":{"login":"freesamael","id":1597103,"avatar_url":"https://avatars.githubusercontent.com/u/1597103?v=3","gravatar_id":"","url":"https://api.github.com/users/freesamael","html_url":"https://github.com/freesamael","followers_url":"https://api.github.com/users/freesamael/followers","following_url":"https://api.github.com/users/freesamael/following{/other_user}","gists_url":"https://api.github.com/users/freesamael/gists{/gist_id}","starred_url":"https://api.github.com/users/freesamael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freesamael/subscriptions","organizations_url":"https://api.github.com/users/freesamael/orgs","repos_url":"https://api.github.com/users/freesamael/repos","events_url":"https://api.github.com/users/freesamael/events{/privacy}","received_events_url":"https://api.github.com/users/freesamael/received_events","type":"User","site_admin":false},"repo":{"id":42116187,"name":"platform_external_qemu","full_name":"freesamael/platform_external_qemu","owner":{"login":"freesamael","id":1597103,"avatar_url":"https://avatars.githubusercontent.com/u/1597103?v=3","gravatar_id":"","url":"https://api.github.com/users/freesamael","html_url":"https://github.com/freesamael","followers_url":"https://api.github.com/users/freesamael/followers","following_url":"https://api.github.com/users/freesamael/following{/other_user}","gists_url":"https://api.github.com/users/freesamael/gists{/gist_id}","starred_url":"https://api.github.com/users/freesamael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freesamael/subscriptions","organizations_url":"https://api.github.com/users/freesamael/orgs","repos_url":"https://api.github.com/users/freesamael/repos","events_url":"https://api.github.com/users/freesamael/events{/privacy}","received_events_url":"https://api.github.com/users/freesamael/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/freesamael/platform_external_qemu","description":null,"fork":true,"url":"https://api.github.com/repos/freesamael/platform_external_qemu","forks_url":"https://api.github.com/repos/freesamael/platform_external_qemu/forks","keys_url":"https://api.github.com/repos/freesamael/platform_external_qemu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freesamael/platform_external_qemu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freesamael/platform_external_qemu/teams","hooks_url":"https://api.github.com/repos/freesamael/platform_external_qemu/hooks","issue_events_url":"https://api.github.com/repos/freesamael/platform_external_qemu/issues/events{/number}","events_url":"https://api.github.com/repos/freesamael/platform_external_qemu/events","assignees_url":"https://api.github.com/repos/freesamael/platform_external_qemu/assignees{/user}","branches_url":"https://api.github.com/repos/freesamael/platform_external_qemu/branches{/branch}","tags_url":"https://api.github.com/repos/freesamael/platform_external_qemu/tags","blobs_url":"https://api.github.com/repos/freesamael/platform_external_qemu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freesamael/platform_external_qemu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freesamael/platform_external_qemu/git/refs{/sha}","trees_url":"https://api.github.com/repos/freesamael/platform_external_qemu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freesamael/platform_external_qemu/statuses/{sha}","languages_url":"https://api.github.com/repos/freesamael/platform_external_qemu/languages","stargazers_url":"https://api.github.com/repos/freesamael/platform_external_qemu/stargazers","contributors_url":"https://api.github.com/repos/freesamael/platform_external_qemu/contributors","subscribers_url":"https://api.github.com/repos/freesamael/platform_external_qemu/subscribers","subscription_url":"https://api.github.com/repos/freesamael/platform_external_qemu/subscription","commits_url":"https://api.github.com/repos/freesamael/platform_external_qemu/commits{/sha}","git_commits_url":"https://api.github.com/repos/freesamael/platform_external_qemu/git/commits{/sha}","comments_url":"https://api.github.com/repos/freesamael/platform_external_qemu/comments{/number}","issue_comment_url":"https://api.github.com/repos/freesamael/platform_external_qemu/issues/comments{/number}","contents_url":"https://api.github.com/repos/freesamael/platform_external_qemu/contents/{+path}","compare_url":"https://api.github.com/repos/freesamael/platform_external_qemu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freesamael/platform_external_qemu/merges","archive_url":"https://api.github.com/repos/freesamael/platform_external_qemu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freesamael/platform_external_qemu/downloads","issues_url":"https://api.github.com/repos/freesamael/platform_external_qemu/issues{/number}","pulls_url":"https://api.github.com/repos/freesamael/platform_external_qemu/pulls{/number}","milestones_url":"https://api.github.com/repos/freesamael/platform_external_qemu/milestones{/number}","notifications_url":"https://api.github.com/repos/freesamael/platform_external_qemu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freesamael/platform_external_qemu/labels{/name}","releases_url":"https://api.github.com/repos/freesamael/platform_external_qemu/releases{/id}","created_at":"2015-09-08T14:08:42Z","updated_at":"2015-09-08T14:08:53Z","pushed_at":"2015-10-19T07:14:58Z","git_url":"git://github.com/freesamael/platform_external_qemu.git","ssh_url":"git@github.com:freesamael/platform_external_qemu.git","clone_url":"https://github.com/freesamael/platform_external_qemu.git","svn_url":"https://github.com/freesamael/platform_external_qemu","homepage":null,"size":22592,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-b2g:b2g-kitkat","ref":"b2g-kitkat","sha":"b1f6e6797468ecce33acdb780a84cd0bbb751dd9","user":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"repo":{"id":4523976,"name":"platform_external_qemu","full_name":"mozilla-b2g/platform_external_qemu","owner":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-b2g/platform_external_qemu","description":null,"fork":true,"url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu","forks_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/forks","keys_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/teams","hooks_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/hooks","issue_events_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/events","assignees_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/tags","blobs_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/languages","stargazers_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/stargazers","contributors_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/contributors","subscribers_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/subscribers","subscription_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/subscription","commits_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/merges","archive_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/downloads","issues_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/releases{/id}","created_at":"2012-06-01T20:28:56Z","updated_at":"2015-04-27T11:22:27Z","pushed_at":"2015-10-19T07:14:58Z","git_url":"git://github.com/mozilla-b2g/platform_external_qemu.git","ssh_url":"git@github.com:mozilla-b2g/platform_external_qemu.git","clone_url":"https://github.com/mozilla-b2g/platform_external_qemu.git","svn_url":"https://github.com/mozilla-b2g/platform_external_qemu","homepage":null,"size":23877,"stargazers_count":5,"watchers_count":5,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":15,"forks":29,"open_issues":15,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/162"},"html":{"href":"https://github.com/mozilla-b2g/platform_external_qemu/pull/162"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/issues/162"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/issues/162/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/162/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/162/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/statuses/47539b2676db4c32b7586350b5c35abd7815b142"}}}}