{"action":"created","comment":{"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/pulls/comments/28762297","id":28762297,"diff_hunk":"@@ -5,54 +5,50 @@\n         if (!api_result || api_result.error || !api_result.to || !api_result.from || !api_result.connections) {\n             return Spice.failed('switzerland');\n         }\n-        \n+\n         var to = api_result.to.name || '',\n             from = api_result.from.name || '';\n-        \n-        Spice.add({\n-            id: \"switzerland\",\n-            name: \"Swiss Trains\",\n-            data: api_result.connections,\n-            meta: {\n-                heading: from + \" to \" + to,\n-                sourceName: \"transport.opendata.ch\",\n-                sourceUrl: 'http://transport.opendata.ch/examples/connections.php?from=' + from + '&to=' + to\n-            },\n-            templates: {\n-                group: 'base',\n-                detail: false,\n-                item_detail: false,\n-                options: {\n-                    content: Spice.transit_switzerland.train_item,\n-                    moreAt: true\n-                }\n-            },\n-            normalize: function(item){\n-                return {\n-                    arrival_time: format_time(item.to.arrival),\n-                    departure_time: format_time(item.from.departure),\n-                    name: item.sections[0].journey.name,\n-                    platform: item.from.platform,\n-                    status: (item.from.delay) ? 'Delayed' : 'On time',\n-                    status_class: (item.from.delay) ? 'switzerland__delayed' : '',\n-                    transfers: format_transfers(item.transfers),\n-                    url: 'http://transport.opendata.ch/examples/connections.php?from=' + from + '&to=' + to\n+\n+        DDG.require('moment.js', function() {\n+            Spice.add({\n+                id: \"switzerland\",\n+                name: \"Swiss Trains\",\n+                data: api_result.connections,\n+                meta: {\n+                    heading: from + \" to \" + to,\n+                    sourceName: \"transport.opendata.ch\",\n+                    sourceUrl: 'http://transport.opendata.ch/examples/connections.php?from=' + from + '&to=' + to\n+                },\n+                templates: {\n+                    group: 'base',\n+                    detail: false,\n+                    item_detail: false,\n+                    options: {\n+                        content: Spice.transit_switzerland.train_item,\n+                        moreAt: true\n+                    }\n+                },\n+                normalize: function(item){\n+                    console.log(item);\n+                    return {\n+                        arrival_time: moment(item.to.arrival).zone(item.to.arrival).format('LT'),\n+                        departure_time: moment(item.from.departure).zone(item.from.departure).format('LT'),","path":"share/spice/transit/switzerland/transit_switzerland.js","position":null,"original_position":61,"commit_id":"662f2db7ca7fbb4b6e42dc596b9758c6e0461ce3","original_commit_id":"af47829e24dfe52a61f80c5fb431c71066b3d74c","user":{"login":"iambibhas","id":357253,"avatar_url":"https://avatars.githubusercontent.com/u/357253?v=3","gravatar_id":"","url":"https://api.github.com/users/iambibhas","html_url":"https://github.com/iambibhas","followers_url":"https://api.github.com/users/iambibhas/followers","following_url":"https://api.github.com/users/iambibhas/following{/other_user}","gists_url":"https://api.github.com/users/iambibhas/gists{/gist_id}","starred_url":"https://api.github.com/users/iambibhas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iambibhas/subscriptions","organizations_url":"https://api.github.com/users/iambibhas/orgs","repos_url":"https://api.github.com/users/iambibhas/repos","events_url":"https://api.github.com/users/iambibhas/events{/privacy}","received_events_url":"https://api.github.com/users/iambibhas/received_events","type":"User","site_admin":false},"body":"Done.\r\n","created_at":"2015-04-21T09:24:58Z","updated_at":"2015-04-21T09:24:58Z","html_url":"https://github.com/duckduckgo/zeroclickinfo-spice/pull/1784#discussion_r28762297","pull_request_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/pulls/1784","_links":{"self":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/pulls/comments/28762297"},"html":{"href":"https://github.com/duckduckgo/zeroclickinfo-spice/pull/1784#discussion_r28762297"},"pull_request":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/pulls/1784"}}},"pull_request":{"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/pulls/1784","id":33573886,"html_url":"https://github.com/duckduckgo/zeroclickinfo-spice/pull/1784","diff_url":"https://github.com/duckduckgo/zeroclickinfo-spice/pull/1784.diff","patch_url":"https://github.com/duckduckgo/zeroclickinfo-spice/pull/1784.patch","issue_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/issues/1784","number":1784,"state":"open","locked":false,"title":"Transit::Switzerland - using moment to show 12h time","user":{"login":"iambibhas","id":357253,"avatar_url":"https://avatars.githubusercontent.com/u/357253?v=3","gravatar_id":"","url":"https://api.github.com/users/iambibhas","html_url":"https://github.com/iambibhas","followers_url":"https://api.github.com/users/iambibhas/followers","following_url":"https://api.github.com/users/iambibhas/following{/other_user}","gists_url":"https://api.github.com/users/iambibhas/gists{/gist_id}","starred_url":"https://api.github.com/users/iambibhas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iambibhas/subscriptions","organizations_url":"https://api.github.com/users/iambibhas/orgs","repos_url":"https://api.github.com/users/iambibhas/repos","events_url":"https://api.github.com/users/iambibhas/events{/privacy}","received_events_url":"https://api.github.com/users/iambibhas/received_events","type":"User","site_admin":false},"body":"Fixes #1781. \r\n\r\nI'm showing local time of the train, not the local time of the user. Is that fine? Might be easy to, let's say, instruct someone over phone or plan something.\r\n\r\n![selection_013](https://cloud.githubusercontent.com/assets/357253/7209270/aa03068a-e564-11e4-978a-1e5de56c3fa0.jpg)\r\n![selection_012](https://cloud.githubusercontent.com/assets/357253/7209269/aa0315ee-e564-11e4-94c6-ccd5a57b0ae4.jpg)\r\n","created_at":"2015-04-17T19:18:50Z","updated_at":"2015-04-21T09:24:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"742609c338cce102d2e50c2d908c160527accc6d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/pulls/1784/commits","review_comments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/pulls/1784/comments","review_comment_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/pulls/comments{/number}","comments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/issues/1784/comments","statuses_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/statuses/662f2db7ca7fbb4b6e42dc596b9758c6e0461ce3","head":{"label":"iambibhas:spice_transit","ref":"spice_transit","sha":"662f2db7ca7fbb4b6e42dc596b9758c6e0461ce3","user":{"login":"iambibhas","id":357253,"avatar_url":"https://avatars.githubusercontent.com/u/357253?v=3","gravatar_id":"","url":"https://api.github.com/users/iambibhas","html_url":"https://github.com/iambibhas","followers_url":"https://api.github.com/users/iambibhas/followers","following_url":"https://api.github.com/users/iambibhas/following{/other_user}","gists_url":"https://api.github.com/users/iambibhas/gists{/gist_id}","starred_url":"https://api.github.com/users/iambibhas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iambibhas/subscriptions","organizations_url":"https://api.github.com/users/iambibhas/orgs","repos_url":"https://api.github.com/users/iambibhas/repos","events_url":"https://api.github.com/users/iambibhas/events{/privacy}","received_events_url":"https://api.github.com/users/iambibhas/received_events","type":"User","site_admin":false},"repo":{"id":31980001,"name":"zeroclickinfo-spice","full_name":"iambibhas/zeroclickinfo-spice","owner":{"login":"iambibhas","id":357253,"avatar_url":"https://avatars.githubusercontent.com/u/357253?v=3","gravatar_id":"","url":"https://api.github.com/users/iambibhas","html_url":"https://github.com/iambibhas","followers_url":"https://api.github.com/users/iambibhas/followers","following_url":"https://api.github.com/users/iambibhas/following{/other_user}","gists_url":"https://api.github.com/users/iambibhas/gists{/gist_id}","starred_url":"https://api.github.com/users/iambibhas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iambibhas/subscriptions","organizations_url":"https://api.github.com/users/iambibhas/orgs","repos_url":"https://api.github.com/users/iambibhas/repos","events_url":"https://api.github.com/users/iambibhas/events{/privacy}","received_events_url":"https://api.github.com/users/iambibhas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iambibhas/zeroclickinfo-spice","description":"DuckDuckGo instant answer plugins based on JavaScript APIs","fork":true,"url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice","forks_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/forks","keys_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/teams","hooks_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/hooks","issue_events_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/issues/events{/number}","events_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/events","assignees_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/assignees{/user}","branches_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/branches{/branch}","tags_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/tags","blobs_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/git/refs{/sha}","trees_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/statuses/{sha}","languages_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/languages","stargazers_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/stargazers","contributors_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/contributors","subscribers_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/subscribers","subscription_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/subscription","commits_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/commits{/sha}","git_commits_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/git/commits{/sha}","comments_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/comments{/number}","issue_comment_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/issues/comments{/number}","contents_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/contents/{+path}","compare_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/merges","archive_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/downloads","issues_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/issues{/number}","pulls_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/pulls{/number}","milestones_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/milestones{/number}","notifications_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/labels{/name}","releases_url":"https://api.github.com/repos/iambibhas/zeroclickinfo-spice/releases{/id}","created_at":"2015-03-10T20:25:35Z","updated_at":"2015-04-17T18:07:47Z","pushed_at":"2015-04-21T08:54:15Z","git_url":"git://github.com/iambibhas/zeroclickinfo-spice.git","ssh_url":"git@github.com:iambibhas/zeroclickinfo-spice.git","clone_url":"https://github.com/iambibhas/zeroclickinfo-spice.git","svn_url":"https://github.com/iambibhas/zeroclickinfo-spice","homepage":"http://duckduckhack.com/","size":14939,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"duckduckgo:master","ref":"master","sha":"6b41cec3b916c6e823e8e5c23c3197c442205e00","user":{"login":"duckduckgo","id":342708,"avatar_url":"https://avatars.githubusercontent.com/u/342708?v=3","gravatar_id":"","url":"https://api.github.com/users/duckduckgo","html_url":"https://github.com/duckduckgo","followers_url":"https://api.github.com/users/duckduckgo/followers","following_url":"https://api.github.com/users/duckduckgo/following{/other_user}","gists_url":"https://api.github.com/users/duckduckgo/gists{/gist_id}","starred_url":"https://api.github.com/users/duckduckgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckduckgo/subscriptions","organizations_url":"https://api.github.com/users/duckduckgo/orgs","repos_url":"https://api.github.com/users/duckduckgo/repos","events_url":"https://api.github.com/users/duckduckgo/events{/privacy}","received_events_url":"https://api.github.com/users/duckduckgo/received_events","type":"Organization","site_admin":false},"repo":{"id":1997671,"name":"zeroclickinfo-spice","full_name":"duckduckgo/zeroclickinfo-spice","owner":{"login":"duckduckgo","id":342708,"avatar_url":"https://avatars.githubusercontent.com/u/342708?v=3","gravatar_id":"","url":"https://api.github.com/users/duckduckgo","html_url":"https://github.com/duckduckgo","followers_url":"https://api.github.com/users/duckduckgo/followers","following_url":"https://api.github.com/users/duckduckgo/following{/other_user}","gists_url":"https://api.github.com/users/duckduckgo/gists{/gist_id}","starred_url":"https://api.github.com/users/duckduckgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckduckgo/subscriptions","organizations_url":"https://api.github.com/users/duckduckgo/orgs","repos_url":"https://api.github.com/users/duckduckgo/repos","events_url":"https://api.github.com/users/duckduckgo/events{/privacy}","received_events_url":"https://api.github.com/users/duckduckgo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/duckduckgo/zeroclickinfo-spice","description":"DuckDuckGo instant answer plugins based on JavaScript APIs","fork":false,"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice","forks_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/forks","keys_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/keys{/key_id}","collaborators_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/teams","hooks_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/hooks","issue_events_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/issues/events{/number}","events_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/events","assignees_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/assignees{/user}","branches_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/branches{/branch}","tags_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/tags","blobs_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/git/refs{/sha}","trees_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/git/trees{/sha}","statuses_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/statuses/{sha}","languages_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/languages","stargazers_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/stargazers","contributors_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/contributors","subscribers_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/subscribers","subscription_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/subscription","commits_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/commits{/sha}","git_commits_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/git/commits{/sha}","comments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/comments{/number}","issue_comment_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/issues/comments{/number}","contents_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/contents/{+path}","compare_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/compare/{base}...{head}","merges_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/merges","archive_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/downloads","issues_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/issues{/number}","pulls_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/pulls{/number}","milestones_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/milestones{/number}","notifications_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/labels{/name}","releases_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/releases{/id}","created_at":"2011-07-04T22:08:37Z","updated_at":"2015-04-20T20:02:17Z","pushed_at":"2015-04-21T08:54:18Z","git_url":"git://github.com/duckduckgo/zeroclickinfo-spice.git","ssh_url":"git@github.com:duckduckgo/zeroclickinfo-spice.git","clone_url":"https://github.com/duckduckgo/zeroclickinfo-spice.git","svn_url":"https://github.com/duckduckgo/zeroclickinfo-spice","homepage":"http://duckduckhack.com/","size":35276,"stargazers_count":224,"watchers_count":224,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":508,"mirror_url":null,"open_issues_count":129,"forks":508,"open_issues":129,"watchers":224,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/pulls/1784"},"html":{"href":"https://github.com/duckduckgo/zeroclickinfo-spice/pull/1784"},"issue":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/issues/1784"},"comments":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/issues/1784/comments"},"review_comments":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/pulls/1784/comments"},"review_comment":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/pulls/1784/commits"},"statuses":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-spice/statuses/662f2db7ca7fbb4b6e42dc596b9758c6e0461ce3"}}}}