{"action":"created","issue":{"url":"https://api.github.com/repos/alisaifee/hiro/issues/4","repository_url":"https://api.github.com/repos/alisaifee/hiro","labels_url":"https://api.github.com/repos/alisaifee/hiro/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/alisaifee/hiro/issues/4/comments","events_url":"https://api.github.com/repos/alisaifee/hiro/issues/4/events","html_url":"https://github.com/alisaifee/hiro/pull/4","id":318217089,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg0NDc5NDc3","number":4,"title":"Fix tests in non-UTC timezone","user":{"login":"olasd","id":12877,"node_id":"MDQ6VXNlcjEyODc3","avatar_url":"https://avatars3.githubusercontent.com/u/12877?v=4","gravatar_id":"","url":"https://api.github.com/users/olasd","html_url":"https://github.com/olasd","followers_url":"https://api.github.com/users/olasd/followers","following_url":"https://api.github.com/users/olasd/following{/other_user}","gists_url":"https://api.github.com/users/olasd/gists{/gist_id}","starred_url":"https://api.github.com/users/olasd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olasd/subscriptions","organizations_url":"https://api.github.com/users/olasd/orgs","repos_url":"https://api.github.com/users/olasd/repos","events_url":"https://api.github.com/users/olasd/events{/privacy}","received_events_url":"https://api.github.com/users/olasd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-04-26T22:21:05Z","updated_at":"2018-10-03T08:54:45Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/alisaifee/hiro/pulls/4","html_url":"https://github.com/alisaifee/hiro/pull/4","diff_url":"https://github.com/alisaifee/hiro/pull/4.diff","patch_url":"https://github.com/alisaifee/hiro/pull/4.patch"},"body":"Hi,\r\n\r\nThe friendly folks at https://reproducible-builds.org/ run regular rebuilds of the Debian archive to check for reproducibility For their reproducibility tests, one of the variables they change across builds is the timezone. They've been testing hiro for reproducibility since it was introduced as a Debian package, and its build has consistently failed during the tests when using a non-UTC timezone.\r\n\r\nhttps://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855908\r\n\r\nThis bug was reported against 0.2, but 0.5 suffers from a variant of this bug as well.\r\n\r\nI've finally had the time to sit down and track down the issue. It turns out that `utils.time_in_seconds` returns inconsistent results when using naive (non-timezone-aware) datetime objects. To get consistent results, we absolutely need to use UTC timestamps everywhere, else the Timeline changes are skewed by the amount of the timezone's UTC offset.\r\n\r\nThis somewhat reverts some of @hyperair's changes, but I think the results are more consistent with what Python expects when using naive datetime objects.\r\n\r\nThe first commit adds TZ variation to the travis build. The second commit is the actual fix for the bug.\r\n\r\nThanks for considering!\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/alisaifee/hiro/4)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/alisaifee/hiro/issues/comments/426560618","html_url":"https://github.com/alisaifee/hiro/pull/4#issuecomment-426560618","issue_url":"https://api.github.com/repos/alisaifee/hiro/issues/4","id":426560618,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjU2MDYxOA==","user":{"login":"olasd","id":12877,"node_id":"MDQ6VXNlcjEyODc3","avatar_url":"https://avatars3.githubusercontent.com/u/12877?v=4","gravatar_id":"","url":"https://api.github.com/users/olasd","html_url":"https://github.com/olasd","followers_url":"https://api.github.com/users/olasd/followers","following_url":"https://api.github.com/users/olasd/following{/other_user}","gists_url":"https://api.github.com/users/olasd/gists{/gist_id}","starred_url":"https://api.github.com/users/olasd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olasd/subscriptions","organizations_url":"https://api.github.com/users/olasd/orgs","repos_url":"https://api.github.com/users/olasd/repos","events_url":"https://api.github.com/users/olasd/events{/privacy}","received_events_url":"https://api.github.com/users/olasd/received_events","type":"User","site_admin":false},"created_at":"2018-10-03T08:54:45Z","updated_at":"2018-10-03T08:54:45Z","author_association":"NONE","body":"> Thank you @olasd (and @hyperair for helping review). LGTM other than the minor comment that I left.\r\n\r\nWelp, sorry @alisaifee for letting this linger for so long. I've updated the PR from your comment now."}}
{"actor":{"display_login":"olasd"}}