{"action":"created","issue":{"url":"https://api.github.com/repos/micropython/micropython/issues/4145","repository_url":"https://api.github.com/repos/micropython/micropython","labels_url":"https://api.github.com/repos/micropython/micropython/issues/4145/labels{/name}","comments_url":"https://api.github.com/repos/micropython/micropython/issues/4145/comments","events_url":"https://api.github.com/repos/micropython/micropython/issues/4145/events","html_url":"https://github.com/micropython/micropython/issues/4145","id":360585145,"node_id":"MDU6SXNzdWUzNjA1ODUxNDU=","number":4145,"title":"utime.localtime() returns UTC and local time in some cases","user":{"login":"lumbric","id":691772,"node_id":"MDQ6VXNlcjY5MTc3Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/691772?v=4","gravatar_id":"","url":"https://api.github.com/users/lumbric","html_url":"https://github.com/lumbric","followers_url":"https://api.github.com/users/lumbric/followers","following_url":"https://api.github.com/users/lumbric/following{/other_user}","gists_url":"https://api.github.com/users/lumbric/gists{/gist_id}","starred_url":"https://api.github.com/users/lumbric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lumbric/subscriptions","organizations_url":"https://api.github.com/users/lumbric/orgs","repos_url":"https://api.github.com/users/lumbric/repos","events_url":"https://api.github.com/users/lumbric/events{/privacy}","received_events_url":"https://api.github.com/users/lumbric/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-15T23:29:23Z","updated_at":"2018-09-16T02:56:26Z","closed_at":null,"author_association":"NONE","body":"In Python [time.localtime()](https://docs.python.org/3/library/time.html#time.localtime) returns local time, but utime.localtime() usually returns a UTC time stamp, only in the unix port it returns local time. I guess the correct way should be local time of course, but not having a consistent way localtime() behaves between ports seems to be even worse. I don't have a good suggestion how to fix it, except implementing #2130 (and breaking backward compatiblity?). But maybe unix port can be improved as a first step?\r\n\r\n(If you consider this ticket part/duplicate of #2130, please close as won't fix.)\r\n\r\nAlso related: #3087."},"comment":{"url":"https://api.github.com/repos/micropython/micropython/issues/comments/421678516","html_url":"https://github.com/micropython/micropython/issues/4145#issuecomment-421678516","issue_url":"https://api.github.com/repos/micropython/micropython/issues/4145","id":421678516,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTY3ODUxNg==","user":{"login":"dhylands","id":127500,"node_id":"MDQ6VXNlcjEyNzUwMA==","avatar_url":"https://avatars1.githubusercontent.com/u/127500?v=4","gravatar_id":"","url":"https://api.github.com/users/dhylands","html_url":"https://github.com/dhylands","followers_url":"https://api.github.com/users/dhylands/followers","following_url":"https://api.github.com/users/dhylands/following{/other_user}","gists_url":"https://api.github.com/users/dhylands/gists{/gist_id}","starred_url":"https://api.github.com/users/dhylands/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhylands/subscriptions","organizations_url":"https://api.github.com/users/dhylands/orgs","repos_url":"https://api.github.com/users/dhylands/repos","events_url":"https://api.github.com/users/dhylands/events{/privacy}","received_events_url":"https://api.github.com/users/dhylands/received_events","type":"User","site_admin":false},"created_at":"2018-09-16T02:56:26Z","updated_at":"2018-09-16T02:56:26Z","author_association":"CONTRIBUTOR","body":"It only returns a UTC timestamp if you set it to a UTC timestamp. If you set the time to be localtime then you get back localtime."}}
{"actor":{"display_login":"dhylands"}}