{"action":"closed","number":698,"pull_request":{"url":"https://api.github.com/repos/PyGithub/PyGithub/pulls/698","id":167607383,"html_url":"https://github.com/PyGithub/PyGithub/pull/698","diff_url":"https://github.com/PyGithub/PyGithub/pull/698.diff","patch_url":"https://github.com/PyGithub/PyGithub/pull/698.patch","issue_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/698","number":698,"state":"closed","locked":false,"title":"Method create_milestone now uses datetime object","user":{"login":"btorresgil","id":4164289,"avatar_url":"https://avatars2.githubusercontent.com/u/4164289?v=4","gravatar_id":"","url":"https://api.github.com/users/btorresgil","html_url":"https://github.com/btorresgil","followers_url":"https://api.github.com/users/btorresgil/followers","following_url":"https://api.github.com/users/btorresgil/following{/other_user}","gists_url":"https://api.github.com/users/btorresgil/gists{/gist_id}","starred_url":"https://api.github.com/users/btorresgil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btorresgil/subscriptions","organizations_url":"https://api.github.com/users/btorresgil/orgs","repos_url":"https://api.github.com/users/btorresgil/repos","events_url":"https://api.github.com/users/btorresgil/events{/privacy}","received_events_url":"https://api.github.com/users/btorresgil/received_events","type":"User","site_admin":false},"body":"This fits better with v3 API which uses ISO8601 date/time format with timezone.\r\n\r\nDate object still allowed for backward compatibility\r\n\r\nThe problem with current implementation is it always passes UTC to the API.  So for example, if you're in the United States and pass a `date` object like `date(2018, 2, 4)`, then GitHub will interpret that as 2018-02-04T00:00:00Z which is actually 2018-02-03 in the United States.  So the due date in the milestone will be the day before the one you passed in.  This is incorrect behavior.\r\n\r\nSince GitHub API needs expects a date/time in ISO 8601 format, it would be best to pass in a `datetime` object and call `.isoformat()` on the object, than to bother with `date` objects.  This will also be more compatible with enhanced datetime libraries like [pendulum](https://pendulum.eustace.io/).","created_at":"2018-02-07T06:20:01Z","updated_at":"2018-02-07T06:44:58Z","closed_at":"2018-02-07T06:44:58Z","merged_at":"2018-02-07T06:44:58Z","merge_commit_sha":"cef98416f45a9cdaf84d7f53cea13ac074a2c05d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls/698/commits","review_comments_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls/698/comments","review_comment_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/698/comments","statuses_url":"https://api.github.com/repos/PyGithub/PyGithub/statuses/7c05c04ef6d903bf2f248a01f85333349b7d0486","head":{"label":"btorresgil:fix_milestone_date","ref":"fix_milestone_date","sha":"7c05c04ef6d903bf2f248a01f85333349b7d0486","user":{"login":"btorresgil","id":4164289,"avatar_url":"https://avatars2.githubusercontent.com/u/4164289?v=4","gravatar_id":"","url":"https://api.github.com/users/btorresgil","html_url":"https://github.com/btorresgil","followers_url":"https://api.github.com/users/btorresgil/followers","following_url":"https://api.github.com/users/btorresgil/following{/other_user}","gists_url":"https://api.github.com/users/btorresgil/gists{/gist_id}","starred_url":"https://api.github.com/users/btorresgil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btorresgil/subscriptions","organizations_url":"https://api.github.com/users/btorresgil/orgs","repos_url":"https://api.github.com/users/btorresgil/repos","events_url":"https://api.github.com/users/btorresgil/events{/privacy}","received_events_url":"https://api.github.com/users/btorresgil/received_events","type":"User","site_admin":false},"repo":{"id":120364771,"name":"PyGithub","full_name":"btorresgil/PyGithub","owner":{"login":"btorresgil","id":4164289,"avatar_url":"https://avatars2.githubusercontent.com/u/4164289?v=4","gravatar_id":"","url":"https://api.github.com/users/btorresgil","html_url":"https://github.com/btorresgil","followers_url":"https://api.github.com/users/btorresgil/followers","following_url":"https://api.github.com/users/btorresgil/following{/other_user}","gists_url":"https://api.github.com/users/btorresgil/gists{/gist_id}","starred_url":"https://api.github.com/users/btorresgil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btorresgil/subscriptions","organizations_url":"https://api.github.com/users/btorresgil/orgs","repos_url":"https://api.github.com/users/btorresgil/repos","events_url":"https://api.github.com/users/btorresgil/events{/privacy}","received_events_url":"https://api.github.com/users/btorresgil/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/btorresgil/PyGithub","description":"Typed interactions with the GitHub API v3","fork":true,"url":"https://api.github.com/repos/btorresgil/PyGithub","forks_url":"https://api.github.com/repos/btorresgil/PyGithub/forks","keys_url":"https://api.github.com/repos/btorresgil/PyGithub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/btorresgil/PyGithub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/btorresgil/PyGithub/teams","hooks_url":"https://api.github.com/repos/btorresgil/PyGithub/hooks","issue_events_url":"https://api.github.com/repos/btorresgil/PyGithub/issues/events{/number}","events_url":"https://api.github.com/repos/btorresgil/PyGithub/events","assignees_url":"https://api.github.com/repos/btorresgil/PyGithub/assignees{/user}","branches_url":"https://api.github.com/repos/btorresgil/PyGithub/branches{/branch}","tags_url":"https://api.github.com/repos/btorresgil/PyGithub/tags","blobs_url":"https://api.github.com/repos/btorresgil/PyGithub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/btorresgil/PyGithub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/btorresgil/PyGithub/git/refs{/sha}","trees_url":"https://api.github.com/repos/btorresgil/PyGithub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/btorresgil/PyGithub/statuses/{sha}","languages_url":"https://api.github.com/repos/btorresgil/PyGithub/languages","stargazers_url":"https://api.github.com/repos/btorresgil/PyGithub/stargazers","contributors_url":"https://api.github.com/repos/btorresgil/PyGithub/contributors","subscribers_url":"https://api.github.com/repos/btorresgil/PyGithub/subscribers","subscription_url":"https://api.github.com/repos/btorresgil/PyGithub/subscription","commits_url":"https://api.github.com/repos/btorresgil/PyGithub/commits{/sha}","git_commits_url":"https://api.github.com/repos/btorresgil/PyGithub/git/commits{/sha}","comments_url":"https://api.github.com/repos/btorresgil/PyGithub/comments{/number}","issue_comment_url":"https://api.github.com/repos/btorresgil/PyGithub/issues/comments{/number}","contents_url":"https://api.github.com/repos/btorresgil/PyGithub/contents/{+path}","compare_url":"https://api.github.com/repos/btorresgil/PyGithub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/btorresgil/PyGithub/merges","archive_url":"https://api.github.com/repos/btorresgil/PyGithub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/btorresgil/PyGithub/downloads","issues_url":"https://api.github.com/repos/btorresgil/PyGithub/issues{/number}","pulls_url":"https://api.github.com/repos/btorresgil/PyGithub/pulls{/number}","milestones_url":"https://api.github.com/repos/btorresgil/PyGithub/milestones{/number}","notifications_url":"https://api.github.com/repos/btorresgil/PyGithub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/btorresgil/PyGithub/labels{/name}","releases_url":"https://api.github.com/repos/btorresgil/PyGithub/releases{/id}","deployments_url":"https://api.github.com/repos/btorresgil/PyGithub/deployments","created_at":"2018-02-05T21:35:09Z","updated_at":"2018-02-05T21:35:13Z","pushed_at":"2018-02-07T06:43:31Z","git_url":"git://github.com/btorresgil/PyGithub.git","ssh_url":"git@github.com:btorresgil/PyGithub.git","clone_url":"https://github.com/btorresgil/PyGithub.git","svn_url":"https://github.com/btorresgil/PyGithub","homepage":"","size":12523,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"PyGithub:master","ref":"master","sha":"e671fdd0356b9580870082ffca112e2236f396f1","user":{"login":"PyGithub","id":11288996,"avatar_url":"https://avatars0.githubusercontent.com/u/11288996?v=4","gravatar_id":"","url":"https://api.github.com/users/PyGithub","html_url":"https://github.com/PyGithub","followers_url":"https://api.github.com/users/PyGithub/followers","following_url":"https://api.github.com/users/PyGithub/following{/other_user}","gists_url":"https://api.github.com/users/PyGithub/gists{/gist_id}","starred_url":"https://api.github.com/users/PyGithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyGithub/subscriptions","organizations_url":"https://api.github.com/users/PyGithub/orgs","repos_url":"https://api.github.com/users/PyGithub/repos","events_url":"https://api.github.com/users/PyGithub/events{/privacy}","received_events_url":"https://api.github.com/users/PyGithub/received_events","type":"Organization","site_admin":false},"repo":{"id":3544490,"name":"PyGithub","full_name":"PyGithub/PyGithub","owner":{"login":"PyGithub","id":11288996,"avatar_url":"https://avatars0.githubusercontent.com/u/11288996?v=4","gravatar_id":"","url":"https://api.github.com/users/PyGithub","html_url":"https://github.com/PyGithub","followers_url":"https://api.github.com/users/PyGithub/followers","following_url":"https://api.github.com/users/PyGithub/following{/other_user}","gists_url":"https://api.github.com/users/PyGithub/gists{/gist_id}","starred_url":"https://api.github.com/users/PyGithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyGithub/subscriptions","organizations_url":"https://api.github.com/users/PyGithub/orgs","repos_url":"https://api.github.com/users/PyGithub/repos","events_url":"https://api.github.com/users/PyGithub/events{/privacy}","received_events_url":"https://api.github.com/users/PyGithub/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PyGithub/PyGithub","description":"Typed interactions with the GitHub API v3","fork":false,"url":"https://api.github.com/repos/PyGithub/PyGithub","forks_url":"https://api.github.com/repos/PyGithub/PyGithub/forks","keys_url":"https://api.github.com/repos/PyGithub/PyGithub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PyGithub/PyGithub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PyGithub/PyGithub/teams","hooks_url":"https://api.github.com/repos/PyGithub/PyGithub/hooks","issue_events_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/events{/number}","events_url":"https://api.github.com/repos/PyGithub/PyGithub/events","assignees_url":"https://api.github.com/repos/PyGithub/PyGithub/assignees{/user}","branches_url":"https://api.github.com/repos/PyGithub/PyGithub/branches{/branch}","tags_url":"https://api.github.com/repos/PyGithub/PyGithub/tags","blobs_url":"https://api.github.com/repos/PyGithub/PyGithub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PyGithub/PyGithub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PyGithub/PyGithub/git/refs{/sha}","trees_url":"https://api.github.com/repos/PyGithub/PyGithub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PyGithub/PyGithub/statuses/{sha}","languages_url":"https://api.github.com/repos/PyGithub/PyGithub/languages","stargazers_url":"https://api.github.com/repos/PyGithub/PyGithub/stargazers","contributors_url":"https://api.github.com/repos/PyGithub/PyGithub/contributors","subscribers_url":"https://api.github.com/repos/PyGithub/PyGithub/subscribers","subscription_url":"https://api.github.com/repos/PyGithub/PyGithub/subscription","commits_url":"https://api.github.com/repos/PyGithub/PyGithub/commits{/sha}","git_commits_url":"https://api.github.com/repos/PyGithub/PyGithub/git/commits{/sha}","comments_url":"https://api.github.com/repos/PyGithub/PyGithub/comments{/number}","issue_comment_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/comments{/number}","contents_url":"https://api.github.com/repos/PyGithub/PyGithub/contents/{+path}","compare_url":"https://api.github.com/repos/PyGithub/PyGithub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PyGithub/PyGithub/merges","archive_url":"https://api.github.com/repos/PyGithub/PyGithub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PyGithub/PyGithub/downloads","issues_url":"https://api.github.com/repos/PyGithub/PyGithub/issues{/number}","pulls_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls{/number}","milestones_url":"https://api.github.com/repos/PyGithub/PyGithub/milestones{/number}","notifications_url":"https://api.github.com/repos/PyGithub/PyGithub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PyGithub/PyGithub/labels{/name}","releases_url":"https://api.github.com/repos/PyGithub/PyGithub/releases{/id}","deployments_url":"https://api.github.com/repos/PyGithub/PyGithub/deployments","created_at":"2012-02-25T12:53:47Z","updated_at":"2018-02-07T01:59:33Z","pushed_at":"2018-02-07T06:44:58Z","git_url":"git://github.com/PyGithub/PyGithub.git","ssh_url":"git@github.com:PyGithub/PyGithub.git","clone_url":"https://github.com/PyGithub/PyGithub.git","svn_url":"https://github.com/PyGithub/PyGithub","homepage":"","size":12500,"stargazers_count":1659,"watchers_count":1659,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":564,"mirror_url":null,"archived":false,"open_issues_count":209,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":564,"open_issues":209,"watchers":1659,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PyGithub/PyGithub/pulls/698"},"html":{"href":"https://github.com/PyGithub/PyGithub/pull/698"},"issue":{"href":"https://api.github.com/repos/PyGithub/PyGithub/issues/698"},"comments":{"href":"https://api.github.com/repos/PyGithub/PyGithub/issues/698/comments"},"review_comments":{"href":"https://api.github.com/repos/PyGithub/PyGithub/pulls/698/comments"},"review_comment":{"href":"https://api.github.com/repos/PyGithub/PyGithub/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PyGithub/PyGithub/pulls/698/commits"},"statuses":{"href":"https://api.github.com/repos/PyGithub/PyGithub/statuses/7c05c04ef6d903bf2f248a01f85333349b7d0486"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"jasonwhite","id":865541,"avatar_url":"https://avatars0.githubusercontent.com/u/865541?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonwhite","html_url":"https://github.com/jasonwhite","followers_url":"https://api.github.com/users/jasonwhite/followers","following_url":"https://api.github.com/users/jasonwhite/following{/other_user}","gists_url":"https://api.github.com/users/jasonwhite/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonwhite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonwhite/subscriptions","organizations_url":"https://api.github.com/users/jasonwhite/orgs","repos_url":"https://api.github.com/users/jasonwhite/repos","events_url":"https://api.github.com/users/jasonwhite/events{/privacy}","received_events_url":"https://api.github.com/users/jasonwhite/received_events","type":"User","site_admin":false},"comments":0,"review_comments":2,"maintainer_can_modify":false,"commits":2,"additions":6,"deletions":3,"changed_files":1}}
{"actor":{"display_login":"jasonwhite"}}