{"action":"created","comment":{"url":"https://api.github.com/repos/binary-com/binary-static/pulls/comments/243987309","pull_request_review_id":187884637,"id":243987309,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0Mzk4NzMwOQ==","diff_hunk":"@@ -40,10 +40,16 @@ const createProposalRequestForContract = (store, type_of_contract) => {\n     const obj_expiry = {};\n     if (store.expiry_type === 'endtime') {\n         const expiry_date = moment.utc(store.expiry_date);\n-        const start_date  = moment.unix(store.start_date || (store.root_store.common.server_time / 1000)).utc();\n-        const is_same_day = expiry_date.isSame(start_date, 'day');\n-        const expiry_time = is_same_day ? store.expiry_time : '23:59:59';\n-        obj_expiry.date_expiry = convertToUnix(expiry_date.unix(), expiry_time);\n+        const start_time = store.start_time.split(':');\n+        if (store.contract_start_type === 'spot') {\n+            const expiry_time = store.expiry_time;\n+            obj_expiry.date_expiry = convertToUnix(expiry_date.unix(), expiry_time);\n+        } else {\n+            const start_date  = moment.unix(store.start_date || (store.root_store.common.server_time / 1000)).utc();\n+            const is_same_day = expiry_date.isSame(start_date, 'day');\n+            const expiry_time = is_same_day ? store.expiry_time : moment(window.time).hour(start_time[0]).minute(start_time[1]).add(-10, 'minutes').format('HH:mm');","path":"src/javascript/app_2/Stores/Modules/Trading/Helpers/proposal.js","position":15,"original_position":15,"commit_id":"b47239718c755453bb1b8804c423b84a34a9ff7f","original_commit_id":"b47239718c755453bb1b8804c423b84a34a9ff7f","user":{"login":"easteregg","id":188798,"node_id":"MDQ6VXNlcjE4ODc5OA==","avatar_url":"https://avatars3.githubusercontent.com/u/188798?v=4","gravatar_id":"","url":"https://api.github.com/users/easteregg","html_url":"https://github.com/easteregg","followers_url":"https://api.github.com/users/easteregg/followers","following_url":"https://api.github.com/users/easteregg/following{/other_user}","gists_url":"https://api.github.com/users/easteregg/gists{/gist_id}","starred_url":"https://api.github.com/users/easteregg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easteregg/subscriptions","organizations_url":"https://api.github.com/users/easteregg/orgs","repos_url":"https://api.github.com/users/easteregg/repos","events_url":"https://api.github.com/users/easteregg/events{/privacy}","received_events_url":"https://api.github.com/users/easteregg/received_events","type":"User","site_admin":false},"body":"This is a question: why we are hardcoding `-10` minutes from the `start_time`? (btw you can use `subtract` method and use a positive integer)","created_at":"2018-12-26T12:03:23Z","updated_at":"2018-12-26T12:03:36Z","html_url":"https://github.com/binary-com/binary-static/pull/4815#discussion_r243987309","pull_request_url":"https://api.github.com/repos/binary-com/binary-static/pulls/4815","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/binary-com/binary-static/pulls/comments/243987309"},"html":{"href":"https://github.com/binary-com/binary-static/pull/4815#discussion_r243987309"},"pull_request":{"href":"https://api.github.com/repos/binary-com/binary-static/pulls/4815"}}},"pull_request":{"url":"https://api.github.com/repos/binary-com/binary-static/pulls/4815","id":240730708,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwNzMwNzA4","html_url":"https://github.com/binary-com/binary-static/pull/4815","diff_url":"https://github.com/binary-com/binary-static/pull/4815.diff","patch_url":"https://github.com/binary-com/binary-static/pull/4815.patch","issue_url":"https://api.github.com/repos/binary-com/binary-static/issues/4815","number":4815,"state":"open","locked":false,"title":"Amam/set _endtime_err","user":{"login":"cakasuma","id":20286228,"node_id":"MDQ6VXNlcjIwMjg2MjI4","avatar_url":"https://avatars2.githubusercontent.com/u/20286228?v=4","gravatar_id":"","url":"https://api.github.com/users/cakasuma","html_url":"https://github.com/cakasuma","followers_url":"https://api.github.com/users/cakasuma/followers","following_url":"https://api.github.com/users/cakasuma/following{/other_user}","gists_url":"https://api.github.com/users/cakasuma/gists{/gist_id}","starred_url":"https://api.github.com/users/cakasuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakasuma/subscriptions","organizations_url":"https://api.github.com/users/cakasuma/orgs","repos_url":"https://api.github.com/users/cakasuma/repos","events_url":"https://api.github.com/users/cakasuma/events{/privacy}","received_events_url":"https://api.github.com/users/cakasuma/received_events","type":"User","site_admin":false},"body":"fix end time on forward start type contract. based on https://trello.com/c/DCivcW7J card","created_at":"2018-12-24T07:09:24Z","updated_at":"2018-12-26T12:03:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44557e0b32e95ce0f31649bf5ff7161e6339ebfd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/binary-com/binary-static/pulls/4815/commits","review_comments_url":"https://api.github.com/repos/binary-com/binary-static/pulls/4815/comments","review_comment_url":"https://api.github.com/repos/binary-com/binary-static/pulls/comments{/number}","comments_url":"https://api.github.com/repos/binary-com/binary-static/issues/4815/comments","statuses_url":"https://api.github.com/repos/binary-com/binary-static/statuses/b47239718c755453bb1b8804c423b84a34a9ff7f","head":{"label":"cakasuma:amam/set_endtime_err","ref":"amam/set_endtime_err","sha":"b47239718c755453bb1b8804c423b84a34a9ff7f","user":{"login":"cakasuma","id":20286228,"node_id":"MDQ6VXNlcjIwMjg2MjI4","avatar_url":"https://avatars2.githubusercontent.com/u/20286228?v=4","gravatar_id":"","url":"https://api.github.com/users/cakasuma","html_url":"https://github.com/cakasuma","followers_url":"https://api.github.com/users/cakasuma/followers","following_url":"https://api.github.com/users/cakasuma/following{/other_user}","gists_url":"https://api.github.com/users/cakasuma/gists{/gist_id}","starred_url":"https://api.github.com/users/cakasuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakasuma/subscriptions","organizations_url":"https://api.github.com/users/cakasuma/orgs","repos_url":"https://api.github.com/users/cakasuma/repos","events_url":"https://api.github.com/users/cakasuma/events{/privacy}","received_events_url":"https://api.github.com/users/cakasuma/received_events","type":"User","site_admin":false},"repo":{"id":158788550,"node_id":"MDEwOlJlcG9zaXRvcnkxNTg3ODg1NTA=","name":"binary-static","full_name":"cakasuma/binary-static","private":false,"owner":{"login":"cakasuma","id":20286228,"node_id":"MDQ6VXNlcjIwMjg2MjI4","avatar_url":"https://avatars2.githubusercontent.com/u/20286228?v=4","gravatar_id":"","url":"https://api.github.com/users/cakasuma","html_url":"https://github.com/cakasuma","followers_url":"https://api.github.com/users/cakasuma/followers","following_url":"https://api.github.com/users/cakasuma/following{/other_user}","gists_url":"https://api.github.com/users/cakasuma/gists{/gist_id}","starred_url":"https://api.github.com/users/cakasuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakasuma/subscriptions","organizations_url":"https://api.github.com/users/cakasuma/orgs","repos_url":"https://api.github.com/users/cakasuma/repos","events_url":"https://api.github.com/users/cakasuma/events{/privacy}","received_events_url":"https://api.github.com/users/cakasuma/received_events","type":"User","site_admin":false},"html_url":"https://github.com/cakasuma/binary-static","description":"Binary.com static content - staging release","fork":true,"url":"https://api.github.com/repos/cakasuma/binary-static","forks_url":"https://api.github.com/repos/cakasuma/binary-static/forks","keys_url":"https://api.github.com/repos/cakasuma/binary-static/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cakasuma/binary-static/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cakasuma/binary-static/teams","hooks_url":"https://api.github.com/repos/cakasuma/binary-static/hooks","issue_events_url":"https://api.github.com/repos/cakasuma/binary-static/issues/events{/number}","events_url":"https://api.github.com/repos/cakasuma/binary-static/events","assignees_url":"https://api.github.com/repos/cakasuma/binary-static/assignees{/user}","branches_url":"https://api.github.com/repos/cakasuma/binary-static/branches{/branch}","tags_url":"https://api.github.com/repos/cakasuma/binary-static/tags","blobs_url":"https://api.github.com/repos/cakasuma/binary-static/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cakasuma/binary-static/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cakasuma/binary-static/git/refs{/sha}","trees_url":"https://api.github.com/repos/cakasuma/binary-static/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cakasuma/binary-static/statuses/{sha}","languages_url":"https://api.github.com/repos/cakasuma/binary-static/languages","stargazers_url":"https://api.github.com/repos/cakasuma/binary-static/stargazers","contributors_url":"https://api.github.com/repos/cakasuma/binary-static/contributors","subscribers_url":"https://api.github.com/repos/cakasuma/binary-static/subscribers","subscription_url":"https://api.github.com/repos/cakasuma/binary-static/subscription","commits_url":"https://api.github.com/repos/cakasuma/binary-static/commits{/sha}","git_commits_url":"https://api.github.com/repos/cakasuma/binary-static/git/commits{/sha}","comments_url":"https://api.github.com/repos/cakasuma/binary-static/comments{/number}","issue_comment_url":"https://api.github.com/repos/cakasuma/binary-static/issues/comments{/number}","contents_url":"https://api.github.com/repos/cakasuma/binary-static/contents/{+path}","compare_url":"https://api.github.com/repos/cakasuma/binary-static/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cakasuma/binary-static/merges","archive_url":"https://api.github.com/repos/cakasuma/binary-static/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cakasuma/binary-static/downloads","issues_url":"https://api.github.com/repos/cakasuma/binary-static/issues{/number}","pulls_url":"https://api.github.com/repos/cakasuma/binary-static/pulls{/number}","milestones_url":"https://api.github.com/repos/cakasuma/binary-static/milestones{/number}","notifications_url":"https://api.github.com/repos/cakasuma/binary-static/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cakasuma/binary-static/labels{/name}","releases_url":"https://api.github.com/repos/cakasuma/binary-static/releases{/id}","deployments_url":"https://api.github.com/repos/cakasuma/binary-static/deployments","created_at":"2018-11-23T06:13:50Z","updated_at":"2018-12-24T03:07:28Z","pushed_at":"2018-12-26T08:12:11Z","git_url":"git://github.com/cakasuma/binary-static.git","ssh_url":"git@github.com:cakasuma/binary-static.git","clone_url":"https://github.com/cakasuma/binary-static.git","svn_url":"https://github.com/cakasuma/binary-static","homepage":"https://staging.binary.com","size":1857679,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"binary-com:master","ref":"master","sha":"4aa5eea56a2d7f44579cfd0d65ebfadd8650ef2d","user":{"login":"binary-com","id":7437559,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0Mzc1NTk=","avatar_url":"https://avatars3.githubusercontent.com/u/7437559?v=4","gravatar_id":"","url":"https://api.github.com/users/binary-com","html_url":"https://github.com/binary-com","followers_url":"https://api.github.com/users/binary-com/followers","following_url":"https://api.github.com/users/binary-com/following{/other_user}","gists_url":"https://api.github.com/users/binary-com/gists{/gist_id}","starred_url":"https://api.github.com/users/binary-com/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binary-com/subscriptions","organizations_url":"https://api.github.com/users/binary-com/orgs","repos_url":"https://api.github.com/users/binary-com/repos","events_url":"https://api.github.com/users/binary-com/events{/privacy}","received_events_url":"https://api.github.com/users/binary-com/received_events","type":"Organization","site_admin":false},"repo":{"id":21266373,"node_id":"MDEwOlJlcG9zaXRvcnkyMTI2NjM3Mw==","name":"binary-static","full_name":"binary-com/binary-static","private":false,"owner":{"login":"binary-com","id":7437559,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0Mzc1NTk=","avatar_url":"https://avatars3.githubusercontent.com/u/7437559?v=4","gravatar_id":"","url":"https://api.github.com/users/binary-com","html_url":"https://github.com/binary-com","followers_url":"https://api.github.com/users/binary-com/followers","following_url":"https://api.github.com/users/binary-com/following{/other_user}","gists_url":"https://api.github.com/users/binary-com/gists{/gist_id}","starred_url":"https://api.github.com/users/binary-com/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binary-com/subscriptions","organizations_url":"https://api.github.com/users/binary-com/orgs","repos_url":"https://api.github.com/users/binary-com/repos","events_url":"https://api.github.com/users/binary-com/events{/privacy}","received_events_url":"https://api.github.com/users/binary-com/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/binary-com/binary-static","description":"Binary.com static content - staging release","fork":false,"url":"https://api.github.com/repos/binary-com/binary-static","forks_url":"https://api.github.com/repos/binary-com/binary-static/forks","keys_url":"https://api.github.com/repos/binary-com/binary-static/keys{/key_id}","collaborators_url":"https://api.github.com/repos/binary-com/binary-static/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/binary-com/binary-static/teams","hooks_url":"https://api.github.com/repos/binary-com/binary-static/hooks","issue_events_url":"https://api.github.com/repos/binary-com/binary-static/issues/events{/number}","events_url":"https://api.github.com/repos/binary-com/binary-static/events","assignees_url":"https://api.github.com/repos/binary-com/binary-static/assignees{/user}","branches_url":"https://api.github.com/repos/binary-com/binary-static/branches{/branch}","tags_url":"https://api.github.com/repos/binary-com/binary-static/tags","blobs_url":"https://api.github.com/repos/binary-com/binary-static/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/binary-com/binary-static/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/binary-com/binary-static/git/refs{/sha}","trees_url":"https://api.github.com/repos/binary-com/binary-static/git/trees{/sha}","statuses_url":"https://api.github.com/repos/binary-com/binary-static/statuses/{sha}","languages_url":"https://api.github.com/repos/binary-com/binary-static/languages","stargazers_url":"https://api.github.com/repos/binary-com/binary-static/stargazers","contributors_url":"https://api.github.com/repos/binary-com/binary-static/contributors","subscribers_url":"https://api.github.com/repos/binary-com/binary-static/subscribers","subscription_url":"https://api.github.com/repos/binary-com/binary-static/subscription","commits_url":"https://api.github.com/repos/binary-com/binary-static/commits{/sha}","git_commits_url":"https://api.github.com/repos/binary-com/binary-static/git/commits{/sha}","comments_url":"https://api.github.com/repos/binary-com/binary-static/comments{/number}","issue_comment_url":"https://api.github.com/repos/binary-com/binary-static/issues/comments{/number}","contents_url":"https://api.github.com/repos/binary-com/binary-static/contents/{+path}","compare_url":"https://api.github.com/repos/binary-com/binary-static/compare/{base}...{head}","merges_url":"https://api.github.com/repos/binary-com/binary-static/merges","archive_url":"https://api.github.com/repos/binary-com/binary-static/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/binary-com/binary-static/downloads","issues_url":"https://api.github.com/repos/binary-com/binary-static/issues{/number}","pulls_url":"https://api.github.com/repos/binary-com/binary-static/pulls{/number}","milestones_url":"https://api.github.com/repos/binary-com/binary-static/milestones{/number}","notifications_url":"https://api.github.com/repos/binary-com/binary-static/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/binary-com/binary-static/labels{/name}","releases_url":"https://api.github.com/repos/binary-com/binary-static/releases{/id}","deployments_url":"https://api.github.com/repos/binary-com/binary-static/deployments","created_at":"2014-06-27T06:34:22Z","updated_at":"2018-12-24T06:06:57Z","pushed_at":"2018-12-26T10:15:57Z","git_url":"git://github.com/binary-com/binary-static.git","ssh_url":"git@github.com:binary-com/binary-static.git","clone_url":"https://github.com/binary-com/binary-static.git","svn_url":"https://github.com/binary-com/binary-static","homepage":"https://staging.binary.com","size":1935399,"stargazers_count":15,"watchers_count":15,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":132,"mirror_url":null,"archived":false,"open_issues_count":29,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":132,"open_issues":29,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/binary-com/binary-static/pulls/4815"},"html":{"href":"https://github.com/binary-com/binary-static/pull/4815"},"issue":{"href":"https://api.github.com/repos/binary-com/binary-static/issues/4815"},"comments":{"href":"https://api.github.com/repos/binary-com/binary-static/issues/4815/comments"},"review_comments":{"href":"https://api.github.com/repos/binary-com/binary-static/pulls/4815/comments"},"review_comment":{"href":"https://api.github.com/repos/binary-com/binary-static/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/binary-com/binary-static/pulls/4815/commits"},"statuses":{"href":"https://api.github.com/repos/binary-com/binary-static/statuses/b47239718c755453bb1b8804c423b84a34a9ff7f"}},"author_association":"NONE"}}
{"actor":{"display_login":"easteregg"}}