{"action":"created","issue":{"url":"https://api.github.com/repos/harlanhaskins/Punctual.swift/issues/2","labels_url":"https://api.github.com/repos/harlanhaskins/Punctual.swift/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/harlanhaskins/Punctual.swift/issues/2/comments","events_url":"https://api.github.com/repos/harlanhaskins/Punctual.swift/issues/2/events","html_url":"https://github.com/harlanhaskins/Punctual.swift/issues/2","id":120589113,"number":2,"title":"Broken code example in readme","user":{"login":"gambogi","id":1028704,"avatar_url":"https://avatars.githubusercontent.com/u/1028704?v=3","gravatar_id":"","url":"https://api.github.com/users/gambogi","html_url":"https://github.com/gambogi","followers_url":"https://api.github.com/users/gambogi/followers","following_url":"https://api.github.com/users/gambogi/following{/other_user}","gists_url":"https://api.github.com/users/gambogi/gists{/gist_id}","starred_url":"https://api.github.com/users/gambogi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gambogi/subscriptions","organizations_url":"https://api.github.com/users/gambogi/orgs","repos_url":"https://api.github.com/users/gambogi/repos","events_url":"https://api.github.com/users/gambogi/events{/privacy}","received_events_url":"https://api.github.com/users/gambogi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-05T21:27:47Z","updated_at":"2015-12-05T21:32:26Z","closed_at":"2015-12-05T21:32:15Z","body":"The last example claims to get tomorrow's date:\r\n```swift\r\n// get tomorrow's date\r\nsleep(1.day.timeInterval)\r\nprint(NSDate())\r\n```\r\nThis will work in most cases, unless completing the call to `1.day.timeInterval` takes longer than the remaining time in the day. The process will then sleep for a day, and print the date of the day _after_ tomorrow.\r\n\r\nThis is a critical issue with this code example."},"comment":{"url":"https://api.github.com/repos/harlanhaskins/Punctual.swift/issues/comments/162249486","html_url":"https://github.com/harlanhaskins/Punctual.swift/issues/2#issuecomment-162249486","issue_url":"https://api.github.com/repos/harlanhaskins/Punctual.swift/issues/2","id":162249486,"user":{"login":"gambogi","id":1028704,"avatar_url":"https://avatars.githubusercontent.com/u/1028704?v=3","gravatar_id":"","url":"https://api.github.com/users/gambogi","html_url":"https://github.com/gambogi","followers_url":"https://api.github.com/users/gambogi/followers","following_url":"https://api.github.com/users/gambogi/following{/other_user}","gists_url":"https://api.github.com/users/gambogi/gists{/gist_id}","starred_url":"https://api.github.com/users/gambogi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gambogi/subscriptions","organizations_url":"https://api.github.com/users/gambogi/orgs","repos_url":"https://api.github.com/users/gambogi/repos","events_url":"https://api.github.com/users/gambogi/events{/privacy}","received_events_url":"https://api.github.com/users/gambogi/received_events","type":"User","site_admin":false},"created_at":"2015-12-05T21:32:26Z","updated_at":"2015-12-05T21:32:26Z","body":"It also breaks on daylight savings and leap seconds actually.\nOn Sat, Dec 5, 2015 at 4:31 PM Harlan <notifications@github.com> wrote:\n\n> Ah, yes! This code will break if run between 11:59:59.9999998 and\n> 00:00:00.0\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/harlanhaskins/Punctual.swift/issues/2#issuecomment-162249424>\n> .\n>\n"}}