{"action":"created","comment":{"url":"https://api.github.com/repos/economist-components/react-i13n-omniture/pulls/comments/45626110","id":45626110,"diff_hunk":"@@ -7,34 +78,35 @@ const OmnitureUtils = {\n     // econofinal or econmobile\n     return '';\n   },\n-  estFormatDate() {\n+  estFormatDate(date) {\n     // EST\n     const offset = -5.0\n-    const clientDate = new Date();\n+    const clientDate = (date) ? date : new Date();\n     const utc = clientDate.getTime() + (clientDate.getTimezoneOffset() * 60000);\n     const serverDate = new Date(utc + (3600000*offset));\n     return serverDate;\n   },\n-  hourOfTheDay() {\n+  hourOfTheDay(date) {\n     // Returns the time of the event in EST time to the closest half hour.\n     // Expected output examples\n+    // \"7:30AM\"\n     // \"11:00AM\"\n     // \"13:30PM\"\n-    const date = this.estFormatDate();\n+    date = (date) ? this.estFormatDate(date) : this.estFormatDate();\n     const hours = date.getHours();\n     // Round minutes to 0 or 30.\n     let minutes = (Math.floor(date.getMinutes()/30) * 30);","path":"OmnitureUtils.es6","position":100,"original_position":100,"commit_id":"e2c4a3ad391495fc21260adcdf52f55cd6dd73fc","original_commit_id":"e2c4a3ad391495fc21260adcdf52f55cd6dd73fc","user":{"login":"keithamus","id":118266,"avatar_url":"https://avatars.githubusercontent.com/u/118266?v=3","gravatar_id":"","url":"https://api.github.com/users/keithamus","html_url":"https://github.com/keithamus","followers_url":"https://api.github.com/users/keithamus/followers","following_url":"https://api.github.com/users/keithamus/following{/other_user}","gists_url":"https://api.github.com/users/keithamus/gists{/gist_id}","starred_url":"https://api.github.com/users/keithamus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keithamus/subscriptions","organizations_url":"https://api.github.com/users/keithamus/orgs","repos_url":"https://api.github.com/users/keithamus/repos","events_url":"https://api.github.com/users/keithamus/events{/privacy}","received_events_url":"https://api.github.com/users/keithamus/received_events","type":"User","site_admin":false},"body":"Instead of `estFormatDate` we should send dates in UTC, using `getUTCMinutes()`","created_at":"2015-11-23T16:39:38Z","updated_at":"2015-11-23T16:39:38Z","html_url":"https://github.com/economist-components/react-i13n-omniture/pull/7#discussion_r45626110","pull_request_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/economist-components/react-i13n-omniture/pulls/comments/45626110"},"html":{"href":"https://github.com/economist-components/react-i13n-omniture/pull/7#discussion_r45626110"},"pull_request":{"href":"https://api.github.com/repos/economist-components/react-i13n-omniture/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/economist-components/react-i13n-omniture/pulls/7","id":51535213,"html_url":"https://github.com/economist-components/react-i13n-omniture/pull/7","diff_url":"https://github.com/economist-components/react-i13n-omniture/pull/7.diff","patch_url":"https://github.com/economist-components/react-i13n-omniture/pull/7.patch","issue_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/issues/7","number":7,"state":"open","locked":false,"title":"Omniture campaign","user":{"login":"umbobabo","id":752680,"avatar_url":"https://avatars.githubusercontent.com/u/752680?v=3","gravatar_id":"","url":"https://api.github.com/users/umbobabo","html_url":"https://github.com/umbobabo","followers_url":"https://api.github.com/users/umbobabo/followers","following_url":"https://api.github.com/users/umbobabo/following{/other_user}","gists_url":"https://api.github.com/users/umbobabo/gists{/gist_id}","starred_url":"https://api.github.com/users/umbobabo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umbobabo/subscriptions","organizations_url":"https://api.github.com/users/umbobabo/orgs","repos_url":"https://api.github.com/users/umbobabo/repos","events_url":"https://api.github.com/users/umbobabo/events{/privacy}","received_events_url":"https://api.github.com/users/umbobabo/received_events","type":"User","site_admin":false},"body":"This implementation has the primary aim to enable tracking of campaigns in the WIF 2016.\r\nAt the same time the wider aim is the portability of the existing code used for the economist.com into the new plugin+tests approach.\r\n\r\nRegarding the .com product this is not the final implementation because there are still part of the original file (assets/ec_omniture_s_code.3.5.js) that need to be ported.","created_at":"2015-11-23T15:14:46Z","updated_at":"2015-11-23T16:39:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dfda01ac1e5048fb271d71d9d15cb8f7a275ae41","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/pulls/7/commits","review_comments_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/pulls/7/comments","review_comment_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/pulls/comments{/number}","comments_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/issues/7/comments","statuses_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/statuses/e2c4a3ad391495fc21260adcdf52f55cd6dd73fc","head":{"label":"umbobabo:omniture-campaign","ref":"omniture-campaign","sha":"e2c4a3ad391495fc21260adcdf52f55cd6dd73fc","user":{"login":"umbobabo","id":752680,"avatar_url":"https://avatars.githubusercontent.com/u/752680?v=3","gravatar_id":"","url":"https://api.github.com/users/umbobabo","html_url":"https://github.com/umbobabo","followers_url":"https://api.github.com/users/umbobabo/followers","following_url":"https://api.github.com/users/umbobabo/following{/other_user}","gists_url":"https://api.github.com/users/umbobabo/gists{/gist_id}","starred_url":"https://api.github.com/users/umbobabo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umbobabo/subscriptions","organizations_url":"https://api.github.com/users/umbobabo/orgs","repos_url":"https://api.github.com/users/umbobabo/repos","events_url":"https://api.github.com/users/umbobabo/events{/privacy}","received_events_url":"https://api.github.com/users/umbobabo/received_events","type":"User","site_admin":false},"repo":{"id":44824611,"name":"react-i13n-omniture","full_name":"umbobabo/react-i13n-omniture","owner":{"login":"umbobabo","id":752680,"avatar_url":"https://avatars.githubusercontent.com/u/752680?v=3","gravatar_id":"","url":"https://api.github.com/users/umbobabo","html_url":"https://github.com/umbobabo","followers_url":"https://api.github.com/users/umbobabo/followers","following_url":"https://api.github.com/users/umbobabo/following{/other_user}","gists_url":"https://api.github.com/users/umbobabo/gists{/gist_id}","starred_url":"https://api.github.com/users/umbobabo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umbobabo/subscriptions","organizations_url":"https://api.github.com/users/umbobabo/orgs","repos_url":"https://api.github.com/users/umbobabo/repos","events_url":"https://api.github.com/users/umbobabo/events{/privacy}","received_events_url":"https://api.github.com/users/umbobabo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/umbobabo/react-i13n-omniture","description":"Omniture plugin for react-i13n","fork":true,"url":"https://api.github.com/repos/umbobabo/react-i13n-omniture","forks_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/forks","keys_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/keys{/key_id}","collaborators_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/teams","hooks_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/hooks","issue_events_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/issues/events{/number}","events_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/events","assignees_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/assignees{/user}","branches_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/branches{/branch}","tags_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/tags","blobs_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/git/refs{/sha}","trees_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/git/trees{/sha}","statuses_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/statuses/{sha}","languages_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/languages","stargazers_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/stargazers","contributors_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/contributors","subscribers_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/subscribers","subscription_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/subscription","commits_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/commits{/sha}","git_commits_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/git/commits{/sha}","comments_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/comments{/number}","issue_comment_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/issues/comments{/number}","contents_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/contents/{+path}","compare_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/compare/{base}...{head}","merges_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/merges","archive_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/downloads","issues_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/issues{/number}","pulls_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/pulls{/number}","milestones_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/milestones{/number}","notifications_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/labels{/name}","releases_url":"https://api.github.com/repos/umbobabo/react-i13n-omniture/releases{/id}","created_at":"2015-10-23T16:22:56Z","updated_at":"2015-10-23T16:22:57Z","pushed_at":"2015-11-23T15:08:56Z","git_url":"git://github.com/umbobabo/react-i13n-omniture.git","ssh_url":"git@github.com:umbobabo/react-i13n-omniture.git","clone_url":"https://github.com/umbobabo/react-i13n-omniture.git","svn_url":"https://github.com/umbobabo/react-i13n-omniture","homepage":null,"size":873,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"economist-components:master","ref":"master","sha":"0f139dbec2b1fde300f4606a88ba040215ca42f5","user":{"login":"economist-components","id":14197671,"avatar_url":"https://avatars.githubusercontent.com/u/14197671?v=3","gravatar_id":"","url":"https://api.github.com/users/economist-components","html_url":"https://github.com/economist-components","followers_url":"https://api.github.com/users/economist-components/followers","following_url":"https://api.github.com/users/economist-components/following{/other_user}","gists_url":"https://api.github.com/users/economist-components/gists{/gist_id}","starred_url":"https://api.github.com/users/economist-components/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/economist-components/subscriptions","organizations_url":"https://api.github.com/users/economist-components/orgs","repos_url":"https://api.github.com/users/economist-components/repos","events_url":"https://api.github.com/users/economist-components/events{/privacy}","received_events_url":"https://api.github.com/users/economist-components/received_events","type":"Organization","site_admin":false},"repo":{"id":44824503,"name":"react-i13n-omniture","full_name":"economist-components/react-i13n-omniture","owner":{"login":"economist-components","id":14197671,"avatar_url":"https://avatars.githubusercontent.com/u/14197671?v=3","gravatar_id":"","url":"https://api.github.com/users/economist-components","html_url":"https://github.com/economist-components","followers_url":"https://api.github.com/users/economist-components/followers","following_url":"https://api.github.com/users/economist-components/following{/other_user}","gists_url":"https://api.github.com/users/economist-components/gists{/gist_id}","starred_url":"https://api.github.com/users/economist-components/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/economist-components/subscriptions","organizations_url":"https://api.github.com/users/economist-components/orgs","repos_url":"https://api.github.com/users/economist-components/repos","events_url":"https://api.github.com/users/economist-components/events{/privacy}","received_events_url":"https://api.github.com/users/economist-components/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/economist-components/react-i13n-omniture","description":"Omniture plugin for react-i13n","fork":false,"url":"https://api.github.com/repos/economist-components/react-i13n-omniture","forks_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/forks","keys_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/keys{/key_id}","collaborators_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/teams","hooks_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/hooks","issue_events_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/issues/events{/number}","events_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/events","assignees_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/assignees{/user}","branches_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/branches{/branch}","tags_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/tags","blobs_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/git/refs{/sha}","trees_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/git/trees{/sha}","statuses_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/statuses/{sha}","languages_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/languages","stargazers_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/stargazers","contributors_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/contributors","subscribers_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/subscribers","subscription_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/subscription","commits_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/commits{/sha}","git_commits_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/git/commits{/sha}","comments_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/comments{/number}","issue_comment_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/issues/comments{/number}","contents_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/contents/{+path}","compare_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/compare/{base}...{head}","merges_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/merges","archive_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/downloads","issues_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/issues{/number}","pulls_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/pulls{/number}","milestones_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/milestones{/number}","notifications_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/labels{/name}","releases_url":"https://api.github.com/repos/economist-components/react-i13n-omniture/releases{/id}","created_at":"2015-10-23T16:20:37Z","updated_at":"2015-10-23T16:22:21Z","pushed_at":"2015-11-23T15:14:46Z","git_url":"git://github.com/economist-components/react-i13n-omniture.git","ssh_url":"git@github.com:economist-components/react-i13n-omniture.git","clone_url":"https://github.com/economist-components/react-i13n-omniture.git","svn_url":"https://github.com/economist-components/react-i13n-omniture","homepage":null,"size":73,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/economist-components/react-i13n-omniture/pulls/7"},"html":{"href":"https://github.com/economist-components/react-i13n-omniture/pull/7"},"issue":{"href":"https://api.github.com/repos/economist-components/react-i13n-omniture/issues/7"},"comments":{"href":"https://api.github.com/repos/economist-components/react-i13n-omniture/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/economist-components/react-i13n-omniture/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/economist-components/react-i13n-omniture/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/economist-components/react-i13n-omniture/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/economist-components/react-i13n-omniture/statuses/e2c4a3ad391495fc21260adcdf52f55cd6dd73fc"}}}}