{"action":"closed","issue":{"url":"https://api.github.com/repos/pebble/pebblejs/issues/82","labels_url":"https://api.github.com/repos/pebble/pebblejs/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/pebble/pebblejs/issues/82/comments","events_url":"https://api.github.com/repos/pebble/pebblejs/issues/82/events","html_url":"https://github.com/pebble/pebblejs/issues/82","id":97211239,"number":82,"title":"Incorrect example for Wakeup.schedule()","user":{"login":"scribu","id":225715,"avatar_url":"https://avatars.githubusercontent.com/u/225715?v=3","gravatar_id":"","url":"https://api.github.com/users/scribu","html_url":"https://github.com/scribu","followers_url":"https://api.github.com/users/scribu/followers","following_url":"https://api.github.com/users/scribu/following{/other_user}","gists_url":"https://api.github.com/users/scribu/gists{/gist_id}","starred_url":"https://api.github.com/users/scribu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scribu/subscriptions","organizations_url":"https://api.github.com/users/scribu/orgs","repos_url":"https://api.github.com/users/scribu/repos","events_url":"https://api.github.com/users/scribu/events{/privacy}","received_events_url":"https://api.github.com/users/scribu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2015-07-25T09:12:56Z","updated_at":"2015-08-17T18:26:34Z","closed_at":"2015-08-17T18:26:34Z","body":"The docs for [Wakeup.schedule](http://developer.getpebble.com/docs/pebblejs/#wakeup-schedule-options-callback-event) read:\r\n\r\n```js\r\nWakeup.schedule(\r\n  {\r\n    // Set the wakeup event for one minute from now\r\n    time: Date.now() / 1000 + 60,\r\n  ...\r\n```\r\n\r\nBut this is correct only if the timezone offset is 0. Otherwize, the wakeup will not happen after 1 minute, but after 3 hours and 1 minute, or however large the offset is.\r\n\r\nA proper call would be:\r\n\r\n```js\r\nWakeup.schedule(\r\n  {\r\n    // Set the wakeup event for one minute from now\r\n    time: Date.now() / 1000 + (new Date().getTimezoneOffset() * 60) + 60,\r\n  ...\r\n```"}}