{"action":"created","issue":{"url":"https://api.github.com/repos/citra-emu/citra/issues/1963","repository_url":"https://api.github.com/repos/citra-emu/citra","labels_url":"https://api.github.com/repos/citra-emu/citra/issues/1963/labels{/name}","comments_url":"https://api.github.com/repos/citra-emu/citra/issues/1963/comments","events_url":"https://api.github.com/repos/citra-emu/citra/issues/1963/events","html_url":"https://github.com/citra-emu/citra/pull/1963","id":166606988,"number":1963,"title":"Implement actual system time","user":{"login":"wwylele","id":4592895,"avatar_url":"https://avatars.githubusercontent.com/u/4592895?v=3","gravatar_id":"","url":"https://api.github.com/users/wwylele","html_url":"https://github.com/wwylele","followers_url":"https://api.github.com/users/wwylele/followers","following_url":"https://api.github.com/users/wwylele/following{/other_user}","gists_url":"https://api.github.com/users/wwylele/gists{/gist_id}","starred_url":"https://api.github.com/users/wwylele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwylele/subscriptions","organizations_url":"https://api.github.com/users/wwylele/orgs","repos_url":"https://api.github.com/users/wwylele/repos","events_url":"https://api.github.com/users/wwylele/events{/privacy}","received_events_url":"https://api.github.com/users/wwylele/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-07-20T15:14:58Z","updated_at":"2016-07-23T11:26:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/citra-emu/citra/pulls/1963","html_url":"https://github.com/citra-emu/citra/pull/1963","diff_url":"https://github.com/citra-emu/citra/pull/1963.diff","patch_url":"https://github.com/citra-emu/citra/pull/1963.patch"},"body":"This implemented synchronizing the system time in the `SharedPage` with actual system time. According to [the reaserch](https://github.com/wwylele/ctrhwtest/tree/master/sharedpage), it is updated every hour on real 3DS. so implemented it the same way here. Also, the name of the first field of `SharedPage` was changed, for its behaviour on real 3DS.\r\n\r\nWhen translating system time to 3DS format, I uses Jan 1, 2000 as an auxiliary epoch, for the following reason:\r\n - it is a limit in real 3DS settings\r\n - `epoch = 1970` for `time_t` is not a real standard, and one needs to deal with timezone when using it\r\n - directly using `epoch = 1900` (real 3DS epoch) may result in invalid values, for it is before `time_t`'s epoch.\r\n\r\nThere is a known issue: game uses the formula `SharedPage.date_time + (currentSystemTick - SharedPage.update_tick) * tick_to_second_coefficient` (not exactly, needs more RE) to calculate the current time. Because of the slow pace of citra, the time presented in game will be gradually desynchronized with the actual time, and will experience a time jump at the next update. There are other ways to update system time (listed in #1641), but none of them perfectly resolves the problem. I don't think this is a big deal, and it will be automatically resolved when citra runs at full speed in the future.\r\n\r\n----\r\nSorry to @ObsidianX for didn't talk to him before taking over it, but for #1641 hasn't been activated for a month, I assume that it died. Also sorry for me stealing the show in that PR. Anyway we should put an end to this. This less-than-100-line shouldn't take that long.\r\n\r\nAll research is in the old PR. Tested on Windows and Ubuntu, with different time zone, and with daylight saving on and off. The clock in System Settings App always shows the same time as computer's."},"comment":{"url":"https://api.github.com/repos/citra-emu/citra/issues/comments/234713392","html_url":"https://github.com/citra-emu/citra/pull/1963#issuecomment-234713392","issue_url":"https://api.github.com/repos/citra-emu/citra/issues/1963","id":234713392,"user":{"login":"yuriks","id":341401,"avatar_url":"https://avatars.githubusercontent.com/u/341401?v=3","gravatar_id":"","url":"https://api.github.com/users/yuriks","html_url":"https://github.com/yuriks","followers_url":"https://api.github.com/users/yuriks/followers","following_url":"https://api.github.com/users/yuriks/following{/other_user}","gists_url":"https://api.github.com/users/yuriks/gists{/gist_id}","starred_url":"https://api.github.com/users/yuriks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuriks/subscriptions","organizations_url":"https://api.github.com/users/yuriks/orgs","repos_url":"https://api.github.com/users/yuriks/repos","events_url":"https://api.github.com/users/yuriks/events{/privacy}","received_events_url":"https://api.github.com/users/yuriks/received_events","type":"User","site_admin":false},"created_at":"2016-07-23T11:26:35Z","updated_at":"2016-07-23T11:26:35Z","body":"LGTM"}}
{"actor":{"display_login":"yuriks"}}