{"action":"created","comment":{"url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/comments/57719513","id":57719513,"diff_hunk":"@@ -36,6 +36,9 @@ module.exports = function(user, options) {\n   }\n   user.auth.timestamps.loggedin = new Date();\n   user.lastCron = now;\n+  if (_.isFinite(+user.preferences.timezoneOffset)) {","path":"common/script/fns/cron.js","position":4,"original_position":4,"commit_id":"ae9e6fbe3076cb1d2f6fbc1ed4e4dd67a7b96994","original_commit_id":"ae9e6fbe3076cb1d2f6fbc1ed4e4dd67a7b96994","user":{"login":"crookedneighbor","id":2916945,"avatar_url":"https://avatars.githubusercontent.com/u/2916945?v=3","gravatar_id":"","url":"https://api.github.com/users/crookedneighbor","html_url":"https://github.com/crookedneighbor","followers_url":"https://api.github.com/users/crookedneighbor/followers","following_url":"https://api.github.com/users/crookedneighbor/following{/other_user}","gists_url":"https://api.github.com/users/crookedneighbor/gists{/gist_id}","starred_url":"https://api.github.com/users/crookedneighbor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crookedneighbor/subscriptions","organizations_url":"https://api.github.com/users/crookedneighbor/orgs","repos_url":"https://api.github.com/users/crookedneighbor/repos","events_url":"https://api.github.com/users/crookedneighbor/events{/privacy}","received_events_url":"https://api.github.com/users/crookedneighbor/received_events","type":"User","site_admin":false},"body":"I don't understand this check. Can you elaborate?","created_at":"2016-03-29T13:10:12Z","updated_at":"2016-03-29T13:10:12Z","html_url":"https://github.com/HabitRPG/habitrpg/pull/6981#discussion_r57719513","pull_request_url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/6981","_links":{"self":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/comments/57719513"},"html":{"href":"https://github.com/HabitRPG/habitrpg/pull/6981#discussion_r57719513"},"pull_request":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/6981"}}},"pull_request":{"url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/6981","id":64461523,"html_url":"https://github.com/HabitRPG/habitrpg/pull/6981","diff_url":"https://github.com/HabitRPG/habitrpg/pull/6981.diff","patch_url":"https://github.com/HabitRPG/habitrpg/pull/6981.patch","issue_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/6981","number":6981,"state":"closed","locked":false,"title":"cron timezone fix (stage 1): cron records current timezone in preferences.timezoneOffsetAtLastCron","user":{"login":"Alys","id":1495809,"avatar_url":"https://avatars.githubusercontent.com/u/1495809?v=3","gravatar_id":"","url":"https://api.github.com/users/Alys","html_url":"https://github.com/Alys","followers_url":"https://api.github.com/users/Alys/followers","following_url":"https://api.github.com/users/Alys/following{/other_user}","gists_url":"https://api.github.com/users/Alys/gists{/gist_id}","starred_url":"https://api.github.com/users/Alys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alys/subscriptions","organizations_url":"https://api.github.com/users/Alys/orgs","repos_url":"https://api.github.com/users/Alys/repos","events_url":"https://api.github.com/users/Alys/events{/privacy}","received_events_url":"https://api.github.com/users/Alys/received_events","type":"User","site_admin":false},"body":"First stage in a fix for https://github.com/HabitRPG/habitrpg/issues/3806\r\n\r\n### Changes\r\n\r\n* Adds a new preference to the user model: `preferences.timezoneOffsetAtLastCron`\r\n* Adjusts cron so that when the daily reset happens, `timezoneOffsetAtLastCron` is set to the user's current timezone.\r\n* Adds `timezoneOffsetAtLastCron` to test/common/algos.mocha.js but only enough to stop the current tests failing (proper test coming soon).\r\n\r\nThis is being pushed now so that `timezoneOffsetAtLastCron` can be populated for active players before cron code that uses it is introduced. Any players that don't pick up the new setting in advance won't have anything bad happen to them; they just won't benefit from a new cron feature.","created_at":"2016-03-29T13:02:58Z","updated_at":"2016-03-29T13:10:12Z","closed_at":"2016-03-29T13:05:50Z","merged_at":"2016-03-29T13:05:50Z","merge_commit_sha":"9a1e7a0ad77b9bc74c20d60d26cf4170f919ab75","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/6981/commits","review_comments_url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/6981/comments","review_comment_url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/6981/comments","statuses_url":"https://api.github.com/repos/HabitRPG/habitrpg/statuses/ae9e6fbe3076cb1d2f6fbc1ed4e4dd67a7b96994","head":{"label":"Alys:develop","ref":"develop","sha":"ae9e6fbe3076cb1d2f6fbc1ed4e4dd67a7b96994","user":{"login":"Alys","id":1495809,"avatar_url":"https://avatars.githubusercontent.com/u/1495809?v=3","gravatar_id":"","url":"https://api.github.com/users/Alys","html_url":"https://github.com/Alys","followers_url":"https://api.github.com/users/Alys/followers","following_url":"https://api.github.com/users/Alys/following{/other_user}","gists_url":"https://api.github.com/users/Alys/gists{/gist_id}","starred_url":"https://api.github.com/users/Alys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alys/subscriptions","organizations_url":"https://api.github.com/users/Alys/orgs","repos_url":"https://api.github.com/users/Alys/repos","events_url":"https://api.github.com/users/Alys/events{/privacy}","received_events_url":"https://api.github.com/users/Alys/received_events","type":"User","site_admin":false},"repo":{"id":15664777,"name":"habitrpg","full_name":"Alys/habitrpg","owner":{"login":"Alys","id":1495809,"avatar_url":"https://avatars.githubusercontent.com/u/1495809?v=3","gravatar_id":"","url":"https://api.github.com/users/Alys","html_url":"https://github.com/Alys","followers_url":"https://api.github.com/users/Alys/followers","following_url":"https://api.github.com/users/Alys/following{/other_user}","gists_url":"https://api.github.com/users/Alys/gists{/gist_id}","starred_url":"https://api.github.com/users/Alys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alys/subscriptions","organizations_url":"https://api.github.com/users/Alys/orgs","repos_url":"https://api.github.com/users/Alys/repos","events_url":"https://api.github.com/users/Alys/events{/privacy}","received_events_url":"https://api.github.com/users/Alys/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Alys/habitrpg","description":"A habit tracker app which treats your goals like a Role Playing Game.","fork":true,"url":"https://api.github.com/repos/Alys/habitrpg","forks_url":"https://api.github.com/repos/Alys/habitrpg/forks","keys_url":"https://api.github.com/repos/Alys/habitrpg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Alys/habitrpg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Alys/habitrpg/teams","hooks_url":"https://api.github.com/repos/Alys/habitrpg/hooks","issue_events_url":"https://api.github.com/repos/Alys/habitrpg/issues/events{/number}","events_url":"https://api.github.com/repos/Alys/habitrpg/events","assignees_url":"https://api.github.com/repos/Alys/habitrpg/assignees{/user}","branches_url":"https://api.github.com/repos/Alys/habitrpg/branches{/branch}","tags_url":"https://api.github.com/repos/Alys/habitrpg/tags","blobs_url":"https://api.github.com/repos/Alys/habitrpg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Alys/habitrpg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Alys/habitrpg/git/refs{/sha}","trees_url":"https://api.github.com/repos/Alys/habitrpg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Alys/habitrpg/statuses/{sha}","languages_url":"https://api.github.com/repos/Alys/habitrpg/languages","stargazers_url":"https://api.github.com/repos/Alys/habitrpg/stargazers","contributors_url":"https://api.github.com/repos/Alys/habitrpg/contributors","subscribers_url":"https://api.github.com/repos/Alys/habitrpg/subscribers","subscription_url":"https://api.github.com/repos/Alys/habitrpg/subscription","commits_url":"https://api.github.com/repos/Alys/habitrpg/commits{/sha}","git_commits_url":"https://api.github.com/repos/Alys/habitrpg/git/commits{/sha}","comments_url":"https://api.github.com/repos/Alys/habitrpg/comments{/number}","issue_comment_url":"https://api.github.com/repos/Alys/habitrpg/issues/comments{/number}","contents_url":"https://api.github.com/repos/Alys/habitrpg/contents/{+path}","compare_url":"https://api.github.com/repos/Alys/habitrpg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Alys/habitrpg/merges","archive_url":"https://api.github.com/repos/Alys/habitrpg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Alys/habitrpg/downloads","issues_url":"https://api.github.com/repos/Alys/habitrpg/issues{/number}","pulls_url":"https://api.github.com/repos/Alys/habitrpg/pulls{/number}","milestones_url":"https://api.github.com/repos/Alys/habitrpg/milestones{/number}","notifications_url":"https://api.github.com/repos/Alys/habitrpg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Alys/habitrpg/labels{/name}","releases_url":"https://api.github.com/repos/Alys/habitrpg/releases{/id}","deployments_url":"https://api.github.com/repos/Alys/habitrpg/deployments","created_at":"2014-01-06T04:04:30Z","updated_at":"2014-07-24T09:13:49Z","pushed_at":"2016-03-29T12:35:50Z","git_url":"git://github.com/Alys/habitrpg.git","ssh_url":"git@github.com:Alys/habitrpg.git","clone_url":"https://github.com/Alys/habitrpg.git","svn_url":"https://github.com/Alys/habitrpg","homepage":"habitrpg.com","size":346597,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"HabitRPG:develop","ref":"develop","sha":"f4b43f55f00411d15a30dce45c91d8046cd1f3a4","user":{"login":"HabitRPG","id":3834775,"avatar_url":"https://avatars.githubusercontent.com/u/3834775?v=3","gravatar_id":"","url":"https://api.github.com/users/HabitRPG","html_url":"https://github.com/HabitRPG","followers_url":"https://api.github.com/users/HabitRPG/followers","following_url":"https://api.github.com/users/HabitRPG/following{/other_user}","gists_url":"https://api.github.com/users/HabitRPG/gists{/gist_id}","starred_url":"https://api.github.com/users/HabitRPG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HabitRPG/subscriptions","organizations_url":"https://api.github.com/users/HabitRPG/orgs","repos_url":"https://api.github.com/users/HabitRPG/repos","events_url":"https://api.github.com/users/HabitRPG/events{/privacy}","received_events_url":"https://api.github.com/users/HabitRPG/received_events","type":"Organization","site_admin":false},"repo":{"id":4578898,"name":"habitrpg","full_name":"HabitRPG/habitrpg","owner":{"login":"HabitRPG","id":3834775,"avatar_url":"https://avatars.githubusercontent.com/u/3834775?v=3","gravatar_id":"","url":"https://api.github.com/users/HabitRPG","html_url":"https://github.com/HabitRPG","followers_url":"https://api.github.com/users/HabitRPG/followers","following_url":"https://api.github.com/users/HabitRPG/following{/other_user}","gists_url":"https://api.github.com/users/HabitRPG/gists{/gist_id}","starred_url":"https://api.github.com/users/HabitRPG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HabitRPG/subscriptions","organizations_url":"https://api.github.com/users/HabitRPG/orgs","repos_url":"https://api.github.com/users/HabitRPG/repos","events_url":"https://api.github.com/users/HabitRPG/events{/privacy}","received_events_url":"https://api.github.com/users/HabitRPG/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HabitRPG/habitrpg","description":"A habit tracker app which treats your goals like a Role Playing Game.","fork":false,"url":"https://api.github.com/repos/HabitRPG/habitrpg","forks_url":"https://api.github.com/repos/HabitRPG/habitrpg/forks","keys_url":"https://api.github.com/repos/HabitRPG/habitrpg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HabitRPG/habitrpg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HabitRPG/habitrpg/teams","hooks_url":"https://api.github.com/repos/HabitRPG/habitrpg/hooks","issue_events_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/events{/number}","events_url":"https://api.github.com/repos/HabitRPG/habitrpg/events","assignees_url":"https://api.github.com/repos/HabitRPG/habitrpg/assignees{/user}","branches_url":"https://api.github.com/repos/HabitRPG/habitrpg/branches{/branch}","tags_url":"https://api.github.com/repos/HabitRPG/habitrpg/tags","blobs_url":"https://api.github.com/repos/HabitRPG/habitrpg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HabitRPG/habitrpg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HabitRPG/habitrpg/git/refs{/sha}","trees_url":"https://api.github.com/repos/HabitRPG/habitrpg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HabitRPG/habitrpg/statuses/{sha}","languages_url":"https://api.github.com/repos/HabitRPG/habitrpg/languages","stargazers_url":"https://api.github.com/repos/HabitRPG/habitrpg/stargazers","contributors_url":"https://api.github.com/repos/HabitRPG/habitrpg/contributors","subscribers_url":"https://api.github.com/repos/HabitRPG/habitrpg/subscribers","subscription_url":"https://api.github.com/repos/HabitRPG/habitrpg/subscription","commits_url":"https://api.github.com/repos/HabitRPG/habitrpg/commits{/sha}","git_commits_url":"https://api.github.com/repos/HabitRPG/habitrpg/git/commits{/sha}","comments_url":"https://api.github.com/repos/HabitRPG/habitrpg/comments{/number}","issue_comment_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/comments{/number}","contents_url":"https://api.github.com/repos/HabitRPG/habitrpg/contents/{+path}","compare_url":"https://api.github.com/repos/HabitRPG/habitrpg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HabitRPG/habitrpg/merges","archive_url":"https://api.github.com/repos/HabitRPG/habitrpg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HabitRPG/habitrpg/downloads","issues_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues{/number}","pulls_url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls{/number}","milestones_url":"https://api.github.com/repos/HabitRPG/habitrpg/milestones{/number}","notifications_url":"https://api.github.com/repos/HabitRPG/habitrpg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HabitRPG/habitrpg/labels{/name}","releases_url":"https://api.github.com/repos/HabitRPG/habitrpg/releases{/id}","deployments_url":"https://api.github.com/repos/HabitRPG/habitrpg/deployments","created_at":"2012-06-06T22:49:48Z","updated_at":"2016-03-29T09:35:48Z","pushed_at":"2016-03-29T13:05:50Z","git_url":"git://github.com/HabitRPG/habitrpg.git","ssh_url":"git@github.com:HabitRPG/habitrpg.git","clone_url":"https://github.com/HabitRPG/habitrpg.git","svn_url":"https://github.com/HabitRPG/habitrpg","homepage":"https://habitica.com","size":368538,"stargazers_count":3698,"watchers_count":3698,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1530,"mirror_url":null,"open_issues_count":484,"forks":1530,"open_issues":484,"watchers":3698,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/6981"},"html":{"href":"https://github.com/HabitRPG/habitrpg/pull/6981"},"issue":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/issues/6981"},"comments":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/issues/6981/comments"},"review_comments":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/6981/comments"},"review_comment":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/6981/commits"},"statuses":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/statuses/ae9e6fbe3076cb1d2f6fbc1ed4e4dd67a7b96994"}}}}