{"action":"created","comment":{"url":"https://api.github.com/repos/micropython/micropython-esp32/pulls/comments/145582364","pull_request_review_id":70403441,"id":145582364,"diff_hunk":"@@ -29,9 +30,74 @@\n #include <stdio.h>\n #include <string.h>\n #include <sys/time.h>\n+#include <py/nlr.h>\n+#include <py/smallint.h>\n+#include \"timeutils.h\"\n \n #include \"extmod/utime_mphal.h\"\n \n+/// \\module time - time related functions\n+///\n+/// The `time` module provides functions for getting the current time and date,\n+/// and for sleeping.\n+\n+/// \\function localtime([secs])\n+/// Convert a time expressed in seconds since Jan 1, 2000 into an 8-tuple which\n+/// contains: (year, month, mday, hour, minute, second, weekday, yearday)\n+/// If secs is not provided or None, then the current time from the RTC is used.\n+/// year includes the century (for example 2014)\n+/// month   is 1-12\n+/// mday    is 1-31\n+/// hour    is 0-23\n+/// minute  is 0-59\n+/// second  is 0-59\n+/// weekday is 0-6 for Mon-Sun.\n+/// yearday is 1-366","path":"ports/esp32/modutime.c","position":34,"original_position":34,"commit_id":"30d86f722705870958ba1d4eb043cc5cc0bac6ab","original_commit_id":"30d86f722705870958ba1d4eb043cc5cc0bac6ab","user":{"login":"dpgeorge","id":6187689,"avatar_url":"https://avatars1.githubusercontent.com/u/6187689?v=4","gravatar_id":"","url":"https://api.github.com/users/dpgeorge","html_url":"https://github.com/dpgeorge","followers_url":"https://api.github.com/users/dpgeorge/followers","following_url":"https://api.github.com/users/dpgeorge/following{/other_user}","gists_url":"https://api.github.com/users/dpgeorge/gists{/gist_id}","starred_url":"https://api.github.com/users/dpgeorge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpgeorge/subscriptions","organizations_url":"https://api.github.com/users/dpgeorge/orgs","repos_url":"https://api.github.com/users/dpgeorge/repos","events_url":"https://api.github.com/users/dpgeorge/events{/privacy}","received_events_url":"https://api.github.com/users/dpgeorge/received_events","type":"User","site_admin":false},"body":"No need to copy across these comments.  They are obsolete and the info is provided in the docs.","created_at":"2017-10-19T01:28:35Z","updated_at":"2017-10-19T01:32:57Z","html_url":"https://github.com/micropython/micropython-esp32/pull/203#discussion_r145582364","pull_request_url":"https://api.github.com/repos/micropython/micropython-esp32/pulls/203","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/micropython/micropython-esp32/pulls/comments/145582364"},"html":{"href":"https://github.com/micropython/micropython-esp32/pull/203#discussion_r145582364"},"pull_request":{"href":"https://api.github.com/repos/micropython/micropython-esp32/pulls/203"}}},"pull_request":{"url":"https://api.github.com/repos/micropython/micropython-esp32/pulls/203","id":147439537,"html_url":"https://github.com/micropython/micropython-esp32/pull/203","diff_url":"https://github.com/micropython/micropython-esp32/pull/203.diff","patch_url":"https://github.com/micropython/micropython-esp32/pull/203.patch","issue_url":"https://api.github.com/repos/micropython/micropython-esp32/issues/203","number":203,"state":"open","locked":false,"title":"ports/esp32/modutime.c: add in localtime and mktime","user":{"login":"nickzoic","id":1487686,"avatar_url":"https://avatars3.githubusercontent.com/u/1487686?v=4","gravatar_id":"","url":"https://api.github.com/users/nickzoic","html_url":"https://github.com/nickzoic","followers_url":"https://api.github.com/users/nickzoic/followers","following_url":"https://api.github.com/users/nickzoic/following{/other_user}","gists_url":"https://api.github.com/users/nickzoic/gists{/gist_id}","starred_url":"https://api.github.com/users/nickzoic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickzoic/subscriptions","organizations_url":"https://api.github.com/users/nickzoic/orgs","repos_url":"https://api.github.com/users/nickzoic/repos","events_url":"https://api.github.com/users/nickzoic/events{/privacy}","received_events_url":"https://api.github.com/users/nickzoic/received_events","type":"User","site_admin":false},"body":"Uses code copied directly from Josef Gajdusek's contribution to\r\nthe esp8266 port modifed to work on esp-idf.\r\n\r\nFixes #202","created_at":"2017-10-19T00:04:04Z","updated_at":"2017-10-19T01:32:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"81ec284e4e9e9ac68c246a29099403a32f27d46a","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/micropython/micropython-esp32/pulls/203/commits","review_comments_url":"https://api.github.com/repos/micropython/micropython-esp32/pulls/203/comments","review_comment_url":"https://api.github.com/repos/micropython/micropython-esp32/pulls/comments{/number}","comments_url":"https://api.github.com/repos/micropython/micropython-esp32/issues/203/comments","statuses_url":"https://api.github.com/repos/micropython/micropython-esp32/statuses/30d86f722705870958ba1d4eb043cc5cc0bac6ab","head":{"label":"nickzoic:esp32-time-localtime-mktime","ref":"esp32-time-localtime-mktime","sha":"30d86f722705870958ba1d4eb043cc5cc0bac6ab","user":{"login":"nickzoic","id":1487686,"avatar_url":"https://avatars3.githubusercontent.com/u/1487686?v=4","gravatar_id":"","url":"https://api.github.com/users/nickzoic","html_url":"https://github.com/nickzoic","followers_url":"https://api.github.com/users/nickzoic/followers","following_url":"https://api.github.com/users/nickzoic/following{/other_user}","gists_url":"https://api.github.com/users/nickzoic/gists{/gist_id}","starred_url":"https://api.github.com/users/nickzoic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickzoic/subscriptions","organizations_url":"https://api.github.com/users/nickzoic/orgs","repos_url":"https://api.github.com/users/nickzoic/repos","events_url":"https://api.github.com/users/nickzoic/events{/privacy}","received_events_url":"https://api.github.com/users/nickzoic/received_events","type":"User","site_admin":false},"repo":{"id":81183250,"name":"micropython-esp32","full_name":"nickzoic/micropython-esp32","owner":{"login":"nickzoic","id":1487686,"avatar_url":"https://avatars3.githubusercontent.com/u/1487686?v=4","gravatar_id":"","url":"https://api.github.com/users/nickzoic","html_url":"https://github.com/nickzoic","followers_url":"https://api.github.com/users/nickzoic/followers","following_url":"https://api.github.com/users/nickzoic/following{/other_user}","gists_url":"https://api.github.com/users/nickzoic/gists{/gist_id}","starred_url":"https://api.github.com/users/nickzoic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickzoic/subscriptions","organizations_url":"https://api.github.com/users/nickzoic/orgs","repos_url":"https://api.github.com/users/nickzoic/repos","events_url":"https://api.github.com/users/nickzoic/events{/privacy}","received_events_url":"https://api.github.com/users/nickzoic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nickzoic/micropython-esp32","description":"MicroPython ported to the ESP32","fork":true,"url":"https://api.github.com/repos/nickzoic/micropython-esp32","forks_url":"https://api.github.com/repos/nickzoic/micropython-esp32/forks","keys_url":"https://api.github.com/repos/nickzoic/micropython-esp32/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nickzoic/micropython-esp32/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nickzoic/micropython-esp32/teams","hooks_url":"https://api.github.com/repos/nickzoic/micropython-esp32/hooks","issue_events_url":"https://api.github.com/repos/nickzoic/micropython-esp32/issues/events{/number}","events_url":"https://api.github.com/repos/nickzoic/micropython-esp32/events","assignees_url":"https://api.github.com/repos/nickzoic/micropython-esp32/assignees{/user}","branches_url":"https://api.github.com/repos/nickzoic/micropython-esp32/branches{/branch}","tags_url":"https://api.github.com/repos/nickzoic/micropython-esp32/tags","blobs_url":"https://api.github.com/repos/nickzoic/micropython-esp32/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nickzoic/micropython-esp32/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nickzoic/micropython-esp32/git/refs{/sha}","trees_url":"https://api.github.com/repos/nickzoic/micropython-esp32/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nickzoic/micropython-esp32/statuses/{sha}","languages_url":"https://api.github.com/repos/nickzoic/micropython-esp32/languages","stargazers_url":"https://api.github.com/repos/nickzoic/micropython-esp32/stargazers","contributors_url":"https://api.github.com/repos/nickzoic/micropython-esp32/contributors","subscribers_url":"https://api.github.com/repos/nickzoic/micropython-esp32/subscribers","subscription_url":"https://api.github.com/repos/nickzoic/micropython-esp32/subscription","commits_url":"https://api.github.com/repos/nickzoic/micropython-esp32/commits{/sha}","git_commits_url":"https://api.github.com/repos/nickzoic/micropython-esp32/git/commits{/sha}","comments_url":"https://api.github.com/repos/nickzoic/micropython-esp32/comments{/number}","issue_comment_url":"https://api.github.com/repos/nickzoic/micropython-esp32/issues/comments{/number}","contents_url":"https://api.github.com/repos/nickzoic/micropython-esp32/contents/{+path}","compare_url":"https://api.github.com/repos/nickzoic/micropython-esp32/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nickzoic/micropython-esp32/merges","archive_url":"https://api.github.com/repos/nickzoic/micropython-esp32/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nickzoic/micropython-esp32/downloads","issues_url":"https://api.github.com/repos/nickzoic/micropython-esp32/issues{/number}","pulls_url":"https://api.github.com/repos/nickzoic/micropython-esp32/pulls{/number}","milestones_url":"https://api.github.com/repos/nickzoic/micropython-esp32/milestones{/number}","notifications_url":"https://api.github.com/repos/nickzoic/micropython-esp32/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nickzoic/micropython-esp32/labels{/name}","releases_url":"https://api.github.com/repos/nickzoic/micropython-esp32/releases{/id}","deployments_url":"https://api.github.com/repos/nickzoic/micropython-esp32/deployments","created_at":"2017-02-07T08:09:11Z","updated_at":"2017-05-17T13:15:43Z","pushed_at":"2017-10-19T01:27:57Z","git_url":"git://github.com/nickzoic/micropython-esp32.git","ssh_url":"git@github.com:nickzoic/micropython-esp32.git","clone_url":"https://github.com/nickzoic/micropython-esp32.git","svn_url":"https://github.com/nickzoic/micropython-esp32","homepage":null,"size":30828,"stargazers_count":2,"watchers_count":2,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"esp32"}},"base":{"label":"micropython:esp32","ref":"esp32","sha":"090b6b800b39ee9000a5c759aab0fb13e80a3cc5","user":{"login":"micropython","id":6298560,"avatar_url":"https://avatars1.githubusercontent.com/u/6298560?v=4","gravatar_id":"","url":"https://api.github.com/users/micropython","html_url":"https://github.com/micropython","followers_url":"https://api.github.com/users/micropython/followers","following_url":"https://api.github.com/users/micropython/following{/other_user}","gists_url":"https://api.github.com/users/micropython/gists{/gist_id}","starred_url":"https://api.github.com/users/micropython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micropython/subscriptions","organizations_url":"https://api.github.com/users/micropython/orgs","repos_url":"https://api.github.com/users/micropython/repos","events_url":"https://api.github.com/users/micropython/events{/privacy}","received_events_url":"https://api.github.com/users/micropython/received_events","type":"Organization","site_admin":false},"repo":{"id":76828539,"name":"micropython-esp32","full_name":"micropython/micropython-esp32","owner":{"login":"micropython","id":6298560,"avatar_url":"https://avatars1.githubusercontent.com/u/6298560?v=4","gravatar_id":"","url":"https://api.github.com/users/micropython","html_url":"https://github.com/micropython","followers_url":"https://api.github.com/users/micropython/followers","following_url":"https://api.github.com/users/micropython/following{/other_user}","gists_url":"https://api.github.com/users/micropython/gists{/gist_id}","starred_url":"https://api.github.com/users/micropython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micropython/subscriptions","organizations_url":"https://api.github.com/users/micropython/orgs","repos_url":"https://api.github.com/users/micropython/repos","events_url":"https://api.github.com/users/micropython/events{/privacy}","received_events_url":"https://api.github.com/users/micropython/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/micropython/micropython-esp32","description":"MicroPython ported to the ESP32","fork":false,"url":"https://api.github.com/repos/micropython/micropython-esp32","forks_url":"https://api.github.com/repos/micropython/micropython-esp32/forks","keys_url":"https://api.github.com/repos/micropython/micropython-esp32/keys{/key_id}","collaborators_url":"https://api.github.com/repos/micropython/micropython-esp32/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/micropython/micropython-esp32/teams","hooks_url":"https://api.github.com/repos/micropython/micropython-esp32/hooks","issue_events_url":"https://api.github.com/repos/micropython/micropython-esp32/issues/events{/number}","events_url":"https://api.github.com/repos/micropython/micropython-esp32/events","assignees_url":"https://api.github.com/repos/micropython/micropython-esp32/assignees{/user}","branches_url":"https://api.github.com/repos/micropython/micropython-esp32/branches{/branch}","tags_url":"https://api.github.com/repos/micropython/micropython-esp32/tags","blobs_url":"https://api.github.com/repos/micropython/micropython-esp32/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/micropython/micropython-esp32/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/micropython/micropython-esp32/git/refs{/sha}","trees_url":"https://api.github.com/repos/micropython/micropython-esp32/git/trees{/sha}","statuses_url":"https://api.github.com/repos/micropython/micropython-esp32/statuses/{sha}","languages_url":"https://api.github.com/repos/micropython/micropython-esp32/languages","stargazers_url":"https://api.github.com/repos/micropython/micropython-esp32/stargazers","contributors_url":"https://api.github.com/repos/micropython/micropython-esp32/contributors","subscribers_url":"https://api.github.com/repos/micropython/micropython-esp32/subscribers","subscription_url":"https://api.github.com/repos/micropython/micropython-esp32/subscription","commits_url":"https://api.github.com/repos/micropython/micropython-esp32/commits{/sha}","git_commits_url":"https://api.github.com/repos/micropython/micropython-esp32/git/commits{/sha}","comments_url":"https://api.github.com/repos/micropython/micropython-esp32/comments{/number}","issue_comment_url":"https://api.github.com/repos/micropython/micropython-esp32/issues/comments{/number}","contents_url":"https://api.github.com/repos/micropython/micropython-esp32/contents/{+path}","compare_url":"https://api.github.com/repos/micropython/micropython-esp32/compare/{base}...{head}","merges_url":"https://api.github.com/repos/micropython/micropython-esp32/merges","archive_url":"https://api.github.com/repos/micropython/micropython-esp32/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/micropython/micropython-esp32/downloads","issues_url":"https://api.github.com/repos/micropython/micropython-esp32/issues{/number}","pulls_url":"https://api.github.com/repos/micropython/micropython-esp32/pulls{/number}","milestones_url":"https://api.github.com/repos/micropython/micropython-esp32/milestones{/number}","notifications_url":"https://api.github.com/repos/micropython/micropython-esp32/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/micropython/micropython-esp32/labels{/name}","releases_url":"https://api.github.com/repos/micropython/micropython-esp32/releases{/id}","deployments_url":"https://api.github.com/repos/micropython/micropython-esp32/deployments","created_at":"2016-12-19T04:38:26Z","updated_at":"2017-10-17T01:14:15Z","pushed_at":"2017-10-19T00:04:05Z","git_url":"git://github.com/micropython/micropython-esp32.git","ssh_url":"git@github.com:micropython/micropython-esp32.git","clone_url":"https://github.com/micropython/micropython-esp32.git","svn_url":"https://github.com/micropython/micropython-esp32","homepage":null,"size":30820,"stargazers_count":281,"watchers_count":281,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":107,"mirror_url":null,"open_issues_count":44,"forks":107,"open_issues":44,"watchers":281,"default_branch":"esp32"}},"_links":{"self":{"href":"https://api.github.com/repos/micropython/micropython-esp32/pulls/203"},"html":{"href":"https://github.com/micropython/micropython-esp32/pull/203"},"issue":{"href":"https://api.github.com/repos/micropython/micropython-esp32/issues/203"},"comments":{"href":"https://api.github.com/repos/micropython/micropython-esp32/issues/203/comments"},"review_comments":{"href":"https://api.github.com/repos/micropython/micropython-esp32/pulls/203/comments"},"review_comment":{"href":"https://api.github.com/repos/micropython/micropython-esp32/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/micropython/micropython-esp32/pulls/203/commits"},"statuses":{"href":"https://api.github.com/repos/micropython/micropython-esp32/statuses/30d86f722705870958ba1d4eb043cc5cc0bac6ab"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"dpgeorge"}}