{"action":"closed","number":2692,"pull_request":{"url":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/2692","id":49227786,"html_url":"https://github.com/osTicket/osTicket-1.8/pull/2692","diff_url":"https://github.com/osTicket/osTicket-1.8/pull/2692.diff","patch_url":"https://github.com/osTicket/osTicket-1.8/pull/2692.patch","issue_url":"https://api.github.com/repos/osTicket/osTicket-1.8/issues/2692","number":2692,"state":"closed","locked":false,"title":"Fix due date check when creating and updating tickets","user":{"login":"sadermine","id":9374319,"avatar_url":"https://avatars.githubusercontent.com/u/9374319?v=3","gravatar_id":"","url":"https://api.github.com/users/sadermine","html_url":"https://github.com/sadermine","followers_url":"https://api.github.com/users/sadermine/followers","following_url":"https://api.github.com/users/sadermine/following{/other_user}","gists_url":"https://api.github.com/users/sadermine/gists{/gist_id}","starred_url":"https://api.github.com/users/sadermine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sadermine/subscriptions","organizations_url":"https://api.github.com/users/sadermine/orgs","repos_url":"https://api.github.com/users/sadermine/repos","events_url":"https://api.github.com/users/sadermine/events{/privacy}","received_events_url":"https://api.github.com/users/sadermine/received_events","type":"User","site_admin":false},"body":"Fixes a bug created by trying to compare the due date plus time entered by the agent to the current date/time by using the **time()** function.  The **time()** function creates a timestamp in UTC while the due date plus time stays in the agent's timezone.  This meant that the **duedate <= time()** check may report **\"Due date must be in the future\"** even if the due date was after the current time depending on the user's timezone.\r\n\r\nIn my case I am in the EDT timezone (UTC -4:00) and that meant I could not schedule the due date plus time within 4 hours of the current time because the system would come back with the error **\"Due date must be in the future\"**.\r\n\r\nThis fix converts both the due date plus time and the current date/time to the user's timezone prior to comparing the two times.\r\n\r\nI used **$cfg->getDbTimezone()** to get the agent's timezone.  **Thoughts on if there is a better function to use to pull this information?**","created_at":"2015-10-30T03:31:20Z","updated_at":"2016-02-06T03:33:50Z","closed_at":"2016-02-06T03:33:50Z","merged_at":null,"merge_commit_sha":"86782404ba4ed4b11b2429924f664c1b341fdac8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/2692/commits","review_comments_url":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/2692/comments","review_comment_url":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/comments{/number}","comments_url":"https://api.github.com/repos/osTicket/osTicket-1.8/issues/2692/comments","statuses_url":"https://api.github.com/repos/osTicket/osTicket-1.8/statuses/41bd111453df9d28f75113c086f88d25c190c0a2","head":{"label":"sadermine:bug-duedate_vs_time","ref":"bug-duedate_vs_time","sha":"41bd111453df9d28f75113c086f88d25c190c0a2","user":{"login":"sadermine","id":9374319,"avatar_url":"https://avatars.githubusercontent.com/u/9374319?v=3","gravatar_id":"","url":"https://api.github.com/users/sadermine","html_url":"https://github.com/sadermine","followers_url":"https://api.github.com/users/sadermine/followers","following_url":"https://api.github.com/users/sadermine/following{/other_user}","gists_url":"https://api.github.com/users/sadermine/gists{/gist_id}","starred_url":"https://api.github.com/users/sadermine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sadermine/subscriptions","organizations_url":"https://api.github.com/users/sadermine/orgs","repos_url":"https://api.github.com/users/sadermine/repos","events_url":"https://api.github.com/users/sadermine/events{/privacy}","received_events_url":"https://api.github.com/users/sadermine/received_events","type":"User","site_admin":false},"repo":{"id":45215559,"name":"osTicket-1.8","full_name":"sadermine/osTicket-1.8","owner":{"login":"sadermine","id":9374319,"avatar_url":"https://avatars.githubusercontent.com/u/9374319?v=3","gravatar_id":"","url":"https://api.github.com/users/sadermine","html_url":"https://github.com/sadermine","followers_url":"https://api.github.com/users/sadermine/followers","following_url":"https://api.github.com/users/sadermine/following{/other_user}","gists_url":"https://api.github.com/users/sadermine/gists{/gist_id}","starred_url":"https://api.github.com/users/sadermine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sadermine/subscriptions","organizations_url":"https://api.github.com/users/sadermine/orgs","repos_url":"https://api.github.com/users/sadermine/repos","events_url":"https://api.github.com/users/sadermine/events{/privacy}","received_events_url":"https://api.github.com/users/sadermine/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sadermine/osTicket-1.8","description":"The osTicket open source ticketing system official project repository, for versions 1.8 and later","fork":true,"url":"https://api.github.com/repos/sadermine/osTicket-1.8","forks_url":"https://api.github.com/repos/sadermine/osTicket-1.8/forks","keys_url":"https://api.github.com/repos/sadermine/osTicket-1.8/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sadermine/osTicket-1.8/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sadermine/osTicket-1.8/teams","hooks_url":"https://api.github.com/repos/sadermine/osTicket-1.8/hooks","issue_events_url":"https://api.github.com/repos/sadermine/osTicket-1.8/issues/events{/number}","events_url":"https://api.github.com/repos/sadermine/osTicket-1.8/events","assignees_url":"https://api.github.com/repos/sadermine/osTicket-1.8/assignees{/user}","branches_url":"https://api.github.com/repos/sadermine/osTicket-1.8/branches{/branch}","tags_url":"https://api.github.com/repos/sadermine/osTicket-1.8/tags","blobs_url":"https://api.github.com/repos/sadermine/osTicket-1.8/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sadermine/osTicket-1.8/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sadermine/osTicket-1.8/git/refs{/sha}","trees_url":"https://api.github.com/repos/sadermine/osTicket-1.8/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sadermine/osTicket-1.8/statuses/{sha}","languages_url":"https://api.github.com/repos/sadermine/osTicket-1.8/languages","stargazers_url":"https://api.github.com/repos/sadermine/osTicket-1.8/stargazers","contributors_url":"https://api.github.com/repos/sadermine/osTicket-1.8/contributors","subscribers_url":"https://api.github.com/repos/sadermine/osTicket-1.8/subscribers","subscription_url":"https://api.github.com/repos/sadermine/osTicket-1.8/subscription","commits_url":"https://api.github.com/repos/sadermine/osTicket-1.8/commits{/sha}","git_commits_url":"https://api.github.com/repos/sadermine/osTicket-1.8/git/commits{/sha}","comments_url":"https://api.github.com/repos/sadermine/osTicket-1.8/comments{/number}","issue_comment_url":"https://api.github.com/repos/sadermine/osTicket-1.8/issues/comments{/number}","contents_url":"https://api.github.com/repos/sadermine/osTicket-1.8/contents/{+path}","compare_url":"https://api.github.com/repos/sadermine/osTicket-1.8/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sadermine/osTicket-1.8/merges","archive_url":"https://api.github.com/repos/sadermine/osTicket-1.8/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sadermine/osTicket-1.8/downloads","issues_url":"https://api.github.com/repos/sadermine/osTicket-1.8/issues{/number}","pulls_url":"https://api.github.com/repos/sadermine/osTicket-1.8/pulls{/number}","milestones_url":"https://api.github.com/repos/sadermine/osTicket-1.8/milestones{/number}","notifications_url":"https://api.github.com/repos/sadermine/osTicket-1.8/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sadermine/osTicket-1.8/labels{/name}","releases_url":"https://api.github.com/repos/sadermine/osTicket-1.8/releases{/id}","deployments_url":"https://api.github.com/repos/sadermine/osTicket-1.8/deployments","created_at":"2015-10-29T22:56:38Z","updated_at":"2015-10-29T22:56:43Z","pushed_at":"2015-10-30T03:11:52Z","git_url":"git://github.com/sadermine/osTicket-1.8.git","ssh_url":"git@github.com:sadermine/osTicket-1.8.git","clone_url":"https://github.com/sadermine/osTicket-1.8.git","svn_url":"https://github.com/sadermine/osTicket-1.8","homepage":"osticket.com","size":23925,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"osTicket:develop-next","ref":"develop-next","sha":"3e47a230e6a0ffeca85a7f9896a0fa5f3e5465bf","user":{"login":"osTicket","id":371413,"avatar_url":"https://avatars.githubusercontent.com/u/371413?v=3","gravatar_id":"","url":"https://api.github.com/users/osTicket","html_url":"https://github.com/osTicket","followers_url":"https://api.github.com/users/osTicket/followers","following_url":"https://api.github.com/users/osTicket/following{/other_user}","gists_url":"https://api.github.com/users/osTicket/gists{/gist_id}","starred_url":"https://api.github.com/users/osTicket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osTicket/subscriptions","organizations_url":"https://api.github.com/users/osTicket/orgs","repos_url":"https://api.github.com/users/osTicket/repos","events_url":"https://api.github.com/users/osTicket/events{/privacy}","received_events_url":"https://api.github.com/users/osTicket/received_events","type":"Organization","site_admin":false},"repo":{"id":12063996,"name":"osTicket-1.8","full_name":"osTicket/osTicket-1.8","owner":{"login":"osTicket","id":371413,"avatar_url":"https://avatars.githubusercontent.com/u/371413?v=3","gravatar_id":"","url":"https://api.github.com/users/osTicket","html_url":"https://github.com/osTicket","followers_url":"https://api.github.com/users/osTicket/followers","following_url":"https://api.github.com/users/osTicket/following{/other_user}","gists_url":"https://api.github.com/users/osTicket/gists{/gist_id}","starred_url":"https://api.github.com/users/osTicket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osTicket/subscriptions","organizations_url":"https://api.github.com/users/osTicket/orgs","repos_url":"https://api.github.com/users/osTicket/repos","events_url":"https://api.github.com/users/osTicket/events{/privacy}","received_events_url":"https://api.github.com/users/osTicket/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/osTicket/osTicket-1.8","description":"The osTicket open source ticketing system official project repository, for versions 1.8 and later","fork":false,"url":"https://api.github.com/repos/osTicket/osTicket-1.8","forks_url":"https://api.github.com/repos/osTicket/osTicket-1.8/forks","keys_url":"https://api.github.com/repos/osTicket/osTicket-1.8/keys{/key_id}","collaborators_url":"https://api.github.com/repos/osTicket/osTicket-1.8/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/osTicket/osTicket-1.8/teams","hooks_url":"https://api.github.com/repos/osTicket/osTicket-1.8/hooks","issue_events_url":"https://api.github.com/repos/osTicket/osTicket-1.8/issues/events{/number}","events_url":"https://api.github.com/repos/osTicket/osTicket-1.8/events","assignees_url":"https://api.github.com/repos/osTicket/osTicket-1.8/assignees{/user}","branches_url":"https://api.github.com/repos/osTicket/osTicket-1.8/branches{/branch}","tags_url":"https://api.github.com/repos/osTicket/osTicket-1.8/tags","blobs_url":"https://api.github.com/repos/osTicket/osTicket-1.8/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/osTicket/osTicket-1.8/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/osTicket/osTicket-1.8/git/refs{/sha}","trees_url":"https://api.github.com/repos/osTicket/osTicket-1.8/git/trees{/sha}","statuses_url":"https://api.github.com/repos/osTicket/osTicket-1.8/statuses/{sha}","languages_url":"https://api.github.com/repos/osTicket/osTicket-1.8/languages","stargazers_url":"https://api.github.com/repos/osTicket/osTicket-1.8/stargazers","contributors_url":"https://api.github.com/repos/osTicket/osTicket-1.8/contributors","subscribers_url":"https://api.github.com/repos/osTicket/osTicket-1.8/subscribers","subscription_url":"https://api.github.com/repos/osTicket/osTicket-1.8/subscription","commits_url":"https://api.github.com/repos/osTicket/osTicket-1.8/commits{/sha}","git_commits_url":"https://api.github.com/repos/osTicket/osTicket-1.8/git/commits{/sha}","comments_url":"https://api.github.com/repos/osTicket/osTicket-1.8/comments{/number}","issue_comment_url":"https://api.github.com/repos/osTicket/osTicket-1.8/issues/comments{/number}","contents_url":"https://api.github.com/repos/osTicket/osTicket-1.8/contents/{+path}","compare_url":"https://api.github.com/repos/osTicket/osTicket-1.8/compare/{base}...{head}","merges_url":"https://api.github.com/repos/osTicket/osTicket-1.8/merges","archive_url":"https://api.github.com/repos/osTicket/osTicket-1.8/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/osTicket/osTicket-1.8/downloads","issues_url":"https://api.github.com/repos/osTicket/osTicket-1.8/issues{/number}","pulls_url":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls{/number}","milestones_url":"https://api.github.com/repos/osTicket/osTicket-1.8/milestones{/number}","notifications_url":"https://api.github.com/repos/osTicket/osTicket-1.8/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/osTicket/osTicket-1.8/labels{/name}","releases_url":"https://api.github.com/repos/osTicket/osTicket-1.8/releases{/id}","deployments_url":"https://api.github.com/repos/osTicket/osTicket-1.8/deployments","created_at":"2013-08-12T19:10:14Z","updated_at":"2016-02-05T13:41:50Z","pushed_at":"2016-02-06T01:52:10Z","git_url":"git://github.com/osTicket/osTicket-1.8.git","ssh_url":"git@github.com:osTicket/osTicket-1.8.git","clone_url":"https://github.com/osTicket/osTicket-1.8.git","svn_url":"https://github.com/osTicket/osTicket-1.8","homepage":"osticket.com","size":28638,"stargazers_count":552,"watchers_count":552,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":476,"mirror_url":null,"open_issues_count":1209,"forks":476,"open_issues":1209,"watchers":552,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/2692"},"html":{"href":"https://github.com/osTicket/osTicket-1.8/pull/2692"},"issue":{"href":"https://api.github.com/repos/osTicket/osTicket-1.8/issues/2692"},"comments":{"href":"https://api.github.com/repos/osTicket/osTicket-1.8/issues/2692/comments"},"review_comments":{"href":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/2692/comments"},"review_comment":{"href":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/2692/commits"},"statuses":{"href":"https://api.github.com/repos/osTicket/osTicket-1.8/statuses/41bd111453df9d28f75113c086f88d25c190c0a2"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":1,"review_comments":1,"commits":1,"additions":10,"deletions":3,"changed_files":1}}