{"action":"created","comment":{"url":"https://api.github.com/repos/B2MSolutions/reyna/pulls/comments/76010733","id":76010733,"diff_hunk":"@@ -108,8 +119,12 @@ public static Result canSend(Context context) {\n         return Result.OK;\n     }\n \n-    private static boolean canSendNow(BlackoutTime blackoutTime, String window) throws ParseException {\n-        return blackoutTime.canSendAtTime(new GregorianCalendar(), window);\n+    private static boolean canSendNow(BlackoutTime blackoutTime, String window, GregorianCalendar now) throws ParseException {\n+        return blackoutTime.canSendAtTime(now, window);\n+    }\n+\n+    private static boolean canSendNow(long startUtc, long endUtc, long nowUtc) {","path":"reyna/src/com/b2msolutions/reyna/Dispatcher.java","position":49,"original_position":49,"commit_id":"ca96c5692e9cd994931b2e07ef364e23ea1d8168","original_commit_id":"ca96c5692e9cd994931b2e07ef364e23ea1d8168","user":{"login":"CharlesGarth","id":10598122,"avatar_url":"https://avatars.githubusercontent.com/u/10598122?v=3","gravatar_id":"","url":"https://api.github.com/users/CharlesGarth","html_url":"https://github.com/CharlesGarth","followers_url":"https://api.github.com/users/CharlesGarth/followers","following_url":"https://api.github.com/users/CharlesGarth/following{/other_user}","gists_url":"https://api.github.com/users/CharlesGarth/gists{/gist_id}","starred_url":"https://api.github.com/users/CharlesGarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CharlesGarth/subscriptions","organizations_url":"https://api.github.com/users/CharlesGarth/orgs","repos_url":"https://api.github.com/users/CharlesGarth/repos","events_url":"https://api.github.com/users/CharlesGarth/events{/privacy}","received_events_url":"https://api.github.com/users/CharlesGarth/received_events","type":"User","site_admin":false},"body":"Good idea","created_at":"2016-08-24T08:04:42Z","updated_at":"2016-08-24T08:04:42Z","html_url":"https://github.com/B2MSolutions/reyna/pull/24#discussion_r76010733","pull_request_url":"https://api.github.com/repos/B2MSolutions/reyna/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/B2MSolutions/reyna/pulls/comments/76010733"},"html":{"href":"https://github.com/B2MSolutions/reyna/pull/24#discussion_r76010733"},"pull_request":{"href":"https://api.github.com/repos/B2MSolutions/reyna/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/B2MSolutions/reyna/pulls/24","id":82386001,"html_url":"https://github.com/B2MSolutions/reyna/pull/24","diff_url":"https://github.com/B2MSolutions/reyna/pull/24.diff","patch_url":"https://github.com/B2MSolutions/reyna/pull/24.patch","issue_url":"https://api.github.com/repos/B2MSolutions/reyna/issues/24","number":24,"state":"open","locked":false,"title":"Wwan blackout period","user":{"login":"CharlesGarth","id":10598122,"avatar_url":"https://avatars.githubusercontent.com/u/10598122?v=3","gravatar_id":"","url":"https://api.github.com/users/CharlesGarth","html_url":"https://github.com/CharlesGarth","followers_url":"https://api.github.com/users/CharlesGarth/followers","following_url":"https://api.github.com/users/CharlesGarth/following{/other_user}","gists_url":"https://api.github.com/users/CharlesGarth/gists{/gist_id}","starred_url":"https://api.github.com/users/CharlesGarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CharlesGarth/subscriptions","organizations_url":"https://api.github.com/users/CharlesGarth/orgs","repos_url":"https://api.github.com/users/CharlesGarth/repos","events_url":"https://api.github.com/users/CharlesGarth/events{/privacy}","received_events_url":"https://api.github.com/users/CharlesGarth/received_events","type":"User","site_admin":false},"body":"**Wwan blackout period**\r\nAdds a feature to blackout sending of messages if current time is within a static UTC time range (in millis) and if the device is currently using a mobile connection.\r\n\r\n**Example Usage**\r\n```\r\n// set blackout wwan from now until 1 minute has passed\r\nlong now = new GregorianCalendar().getTimeInMillis();\r\nlong end = now + 60000L;\r\npreferences.saveNonRecurringWwanBlackout(now, end);\r\n\r\n// getter\r\nlong start = preferences.getNonRecurringWwanBlackoutStartTime(); //returns start value\r\nlong end = preferences.getNonRecurringWwanBlackoutEndTime(); //returns end value\r\n\r\n// resetter\r\npreferences.resetNonRecurringWwanBlackout(); //removes both values\r\n```","created_at":"2016-08-23T15:22:38Z","updated_at":"2016-08-24T08:04:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"735865f6281d2d8c9328354b0c6f4804bc980c89","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/B2MSolutions/reyna/pulls/24/commits","review_comments_url":"https://api.github.com/repos/B2MSolutions/reyna/pulls/24/comments","review_comment_url":"https://api.github.com/repos/B2MSolutions/reyna/pulls/comments{/number}","comments_url":"https://api.github.com/repos/B2MSolutions/reyna/issues/24/comments","statuses_url":"https://api.github.com/repos/B2MSolutions/reyna/statuses/ca96c5692e9cd994931b2e07ef364e23ea1d8168","head":{"label":"B2MSolutions:wwan-blackout-period","ref":"wwan-blackout-period","sha":"ca96c5692e9cd994931b2e07ef364e23ea1d8168","user":{"login":"B2MSolutions","id":1344042,"avatar_url":"https://avatars.githubusercontent.com/u/1344042?v=3","gravatar_id":"","url":"https://api.github.com/users/B2MSolutions","html_url":"https://github.com/B2MSolutions","followers_url":"https://api.github.com/users/B2MSolutions/followers","following_url":"https://api.github.com/users/B2MSolutions/following{/other_user}","gists_url":"https://api.github.com/users/B2MSolutions/gists{/gist_id}","starred_url":"https://api.github.com/users/B2MSolutions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/B2MSolutions/subscriptions","organizations_url":"https://api.github.com/users/B2MSolutions/orgs","repos_url":"https://api.github.com/users/B2MSolutions/repos","events_url":"https://api.github.com/users/B2MSolutions/events{/privacy}","received_events_url":"https://api.github.com/users/B2MSolutions/received_events","type":"Organization","site_admin":false},"repo":{"id":4677439,"name":"reyna","full_name":"B2MSolutions/reyna","owner":{"login":"B2MSolutions","id":1344042,"avatar_url":"https://avatars.githubusercontent.com/u/1344042?v=3","gravatar_id":"","url":"https://api.github.com/users/B2MSolutions","html_url":"https://github.com/B2MSolutions","followers_url":"https://api.github.com/users/B2MSolutions/followers","following_url":"https://api.github.com/users/B2MSolutions/following{/other_user}","gists_url":"https://api.github.com/users/B2MSolutions/gists{/gist_id}","starred_url":"https://api.github.com/users/B2MSolutions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/B2MSolutions/subscriptions","organizations_url":"https://api.github.com/users/B2MSolutions/orgs","repos_url":"https://api.github.com/users/B2MSolutions/repos","events_url":"https://api.github.com/users/B2MSolutions/events{/privacy}","received_events_url":"https://api.github.com/users/B2MSolutions/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/B2MSolutions/reyna","description":"An android store and forward library for http post requests. It will keep trying to post your requests until there is a valid connection. Reyna is Icelandic for 'try'.","fork":false,"url":"https://api.github.com/repos/B2MSolutions/reyna","forks_url":"https://api.github.com/repos/B2MSolutions/reyna/forks","keys_url":"https://api.github.com/repos/B2MSolutions/reyna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/B2MSolutions/reyna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/B2MSolutions/reyna/teams","hooks_url":"https://api.github.com/repos/B2MSolutions/reyna/hooks","issue_events_url":"https://api.github.com/repos/B2MSolutions/reyna/issues/events{/number}","events_url":"https://api.github.com/repos/B2MSolutions/reyna/events","assignees_url":"https://api.github.com/repos/B2MSolutions/reyna/assignees{/user}","branches_url":"https://api.github.com/repos/B2MSolutions/reyna/branches{/branch}","tags_url":"https://api.github.com/repos/B2MSolutions/reyna/tags","blobs_url":"https://api.github.com/repos/B2MSolutions/reyna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/B2MSolutions/reyna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/B2MSolutions/reyna/git/refs{/sha}","trees_url":"https://api.github.com/repos/B2MSolutions/reyna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/B2MSolutions/reyna/statuses/{sha}","languages_url":"https://api.github.com/repos/B2MSolutions/reyna/languages","stargazers_url":"https://api.github.com/repos/B2MSolutions/reyna/stargazers","contributors_url":"https://api.github.com/repos/B2MSolutions/reyna/contributors","subscribers_url":"https://api.github.com/repos/B2MSolutions/reyna/subscribers","subscription_url":"https://api.github.com/repos/B2MSolutions/reyna/subscription","commits_url":"https://api.github.com/repos/B2MSolutions/reyna/commits{/sha}","git_commits_url":"https://api.github.com/repos/B2MSolutions/reyna/git/commits{/sha}","comments_url":"https://api.github.com/repos/B2MSolutions/reyna/comments{/number}","issue_comment_url":"https://api.github.com/repos/B2MSolutions/reyna/issues/comments{/number}","contents_url":"https://api.github.com/repos/B2MSolutions/reyna/contents/{+path}","compare_url":"https://api.github.com/repos/B2MSolutions/reyna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/B2MSolutions/reyna/merges","archive_url":"https://api.github.com/repos/B2MSolutions/reyna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/B2MSolutions/reyna/downloads","issues_url":"https://api.github.com/repos/B2MSolutions/reyna/issues{/number}","pulls_url":"https://api.github.com/repos/B2MSolutions/reyna/pulls{/number}","milestones_url":"https://api.github.com/repos/B2MSolutions/reyna/milestones{/number}","notifications_url":"https://api.github.com/repos/B2MSolutions/reyna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/B2MSolutions/reyna/labels{/name}","releases_url":"https://api.github.com/repos/B2MSolutions/reyna/releases{/id}","deployments_url":"https://api.github.com/repos/B2MSolutions/reyna/deployments","created_at":"2012-06-15T16:28:45Z","updated_at":"2016-01-25T08:59:37Z","pushed_at":"2016-08-23T15:22:38Z","git_url":"git://github.com/B2MSolutions/reyna.git","ssh_url":"git@github.com:B2MSolutions/reyna.git","clone_url":"https://github.com/B2MSolutions/reyna.git","svn_url":"https://github.com/B2MSolutions/reyna","homepage":"","size":17046,"stargazers_count":25,"watchers_count":25,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":6,"forks":8,"open_issues":6,"watchers":25,"default_branch":"master"}},"base":{"label":"B2MSolutions:master","ref":"master","sha":"1fdd27a495814334fa5f277521c7342c6236f71c","user":{"login":"B2MSolutions","id":1344042,"avatar_url":"https://avatars.githubusercontent.com/u/1344042?v=3","gravatar_id":"","url":"https://api.github.com/users/B2MSolutions","html_url":"https://github.com/B2MSolutions","followers_url":"https://api.github.com/users/B2MSolutions/followers","following_url":"https://api.github.com/users/B2MSolutions/following{/other_user}","gists_url":"https://api.github.com/users/B2MSolutions/gists{/gist_id}","starred_url":"https://api.github.com/users/B2MSolutions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/B2MSolutions/subscriptions","organizations_url":"https://api.github.com/users/B2MSolutions/orgs","repos_url":"https://api.github.com/users/B2MSolutions/repos","events_url":"https://api.github.com/users/B2MSolutions/events{/privacy}","received_events_url":"https://api.github.com/users/B2MSolutions/received_events","type":"Organization","site_admin":false},"repo":{"id":4677439,"name":"reyna","full_name":"B2MSolutions/reyna","owner":{"login":"B2MSolutions","id":1344042,"avatar_url":"https://avatars.githubusercontent.com/u/1344042?v=3","gravatar_id":"","url":"https://api.github.com/users/B2MSolutions","html_url":"https://github.com/B2MSolutions","followers_url":"https://api.github.com/users/B2MSolutions/followers","following_url":"https://api.github.com/users/B2MSolutions/following{/other_user}","gists_url":"https://api.github.com/users/B2MSolutions/gists{/gist_id}","starred_url":"https://api.github.com/users/B2MSolutions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/B2MSolutions/subscriptions","organizations_url":"https://api.github.com/users/B2MSolutions/orgs","repos_url":"https://api.github.com/users/B2MSolutions/repos","events_url":"https://api.github.com/users/B2MSolutions/events{/privacy}","received_events_url":"https://api.github.com/users/B2MSolutions/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/B2MSolutions/reyna","description":"An android store and forward library for http post requests. It will keep trying to post your requests until there is a valid connection. Reyna is Icelandic for 'try'.","fork":false,"url":"https://api.github.com/repos/B2MSolutions/reyna","forks_url":"https://api.github.com/repos/B2MSolutions/reyna/forks","keys_url":"https://api.github.com/repos/B2MSolutions/reyna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/B2MSolutions/reyna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/B2MSolutions/reyna/teams","hooks_url":"https://api.github.com/repos/B2MSolutions/reyna/hooks","issue_events_url":"https://api.github.com/repos/B2MSolutions/reyna/issues/events{/number}","events_url":"https://api.github.com/repos/B2MSolutions/reyna/events","assignees_url":"https://api.github.com/repos/B2MSolutions/reyna/assignees{/user}","branches_url":"https://api.github.com/repos/B2MSolutions/reyna/branches{/branch}","tags_url":"https://api.github.com/repos/B2MSolutions/reyna/tags","blobs_url":"https://api.github.com/repos/B2MSolutions/reyna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/B2MSolutions/reyna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/B2MSolutions/reyna/git/refs{/sha}","trees_url":"https://api.github.com/repos/B2MSolutions/reyna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/B2MSolutions/reyna/statuses/{sha}","languages_url":"https://api.github.com/repos/B2MSolutions/reyna/languages","stargazers_url":"https://api.github.com/repos/B2MSolutions/reyna/stargazers","contributors_url":"https://api.github.com/repos/B2MSolutions/reyna/contributors","subscribers_url":"https://api.github.com/repos/B2MSolutions/reyna/subscribers","subscription_url":"https://api.github.com/repos/B2MSolutions/reyna/subscription","commits_url":"https://api.github.com/repos/B2MSolutions/reyna/commits{/sha}","git_commits_url":"https://api.github.com/repos/B2MSolutions/reyna/git/commits{/sha}","comments_url":"https://api.github.com/repos/B2MSolutions/reyna/comments{/number}","issue_comment_url":"https://api.github.com/repos/B2MSolutions/reyna/issues/comments{/number}","contents_url":"https://api.github.com/repos/B2MSolutions/reyna/contents/{+path}","compare_url":"https://api.github.com/repos/B2MSolutions/reyna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/B2MSolutions/reyna/merges","archive_url":"https://api.github.com/repos/B2MSolutions/reyna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/B2MSolutions/reyna/downloads","issues_url":"https://api.github.com/repos/B2MSolutions/reyna/issues{/number}","pulls_url":"https://api.github.com/repos/B2MSolutions/reyna/pulls{/number}","milestones_url":"https://api.github.com/repos/B2MSolutions/reyna/milestones{/number}","notifications_url":"https://api.github.com/repos/B2MSolutions/reyna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/B2MSolutions/reyna/labels{/name}","releases_url":"https://api.github.com/repos/B2MSolutions/reyna/releases{/id}","deployments_url":"https://api.github.com/repos/B2MSolutions/reyna/deployments","created_at":"2012-06-15T16:28:45Z","updated_at":"2016-01-25T08:59:37Z","pushed_at":"2016-08-23T15:22:38Z","git_url":"git://github.com/B2MSolutions/reyna.git","ssh_url":"git@github.com:B2MSolutions/reyna.git","clone_url":"https://github.com/B2MSolutions/reyna.git","svn_url":"https://github.com/B2MSolutions/reyna","homepage":"","size":17046,"stargazers_count":25,"watchers_count":25,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":6,"forks":8,"open_issues":6,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/B2MSolutions/reyna/pulls/24"},"html":{"href":"https://github.com/B2MSolutions/reyna/pull/24"},"issue":{"href":"https://api.github.com/repos/B2MSolutions/reyna/issues/24"},"comments":{"href":"https://api.github.com/repos/B2MSolutions/reyna/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/B2MSolutions/reyna/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/B2MSolutions/reyna/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/B2MSolutions/reyna/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/B2MSolutions/reyna/statuses/ca96c5692e9cd994931b2e07ef364e23ea1d8168"}}}}
{"actor":{"display_login":"CharlesGarth"}}