{"action":"created","issue":{"url":"https://api.github.com/repos/freedomofpress/securedrop/issues/834","labels_url":"https://api.github.com/repos/freedomofpress/securedrop/issues/834/labels{/name}","comments_url":"https://api.github.com/repos/freedomofpress/securedrop/issues/834/comments","events_url":"https://api.github.com/repos/freedomofpress/securedrop/issues/834/events","html_url":"https://github.com/freedomofpress/securedrop/pull/834","id":54675999,"number":834,"title":"Rounded timestamps qf 822","user":{"login":"aliclark","id":85300,"avatar_url":"https://avatars.githubusercontent.com/u/85300?v=3","gravatar_id":"","url":"https://api.github.com/users/aliclark","html_url":"https://github.com/aliclark","followers_url":"https://api.github.com/users/aliclark/followers","following_url":"https://api.github.com/users/aliclark/following{/other_user}","gists_url":"https://api.github.com/users/aliclark/gists{/gist_id}","starred_url":"https://api.github.com/users/aliclark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliclark/subscriptions","organizations_url":"https://api.github.com/users/aliclark/orgs","repos_url":"https://api.github.com/users/aliclark/repos","events_url":"https://api.github.com/users/aliclark/events{/privacy}","received_events_url":"https://api.github.com/users/aliclark/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-17T21:27:07Z","updated_at":"2015-01-19T20:11:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/freedomofpress/securedrop/pulls/834","html_url":"https://github.com/freedomofpress/securedrop/pull/834","diff_url":"https://github.com/freedomofpress/securedrop/pull/834.diff","patch_url":"https://github.com/freedomofpress/securedrop/pull/834.patch"},"body":"Fixes #822 by truncating source-related HH:MM times to 00:00, leaving only the date information according to the server's local time.\r\n\r\nThis would normally provide 1 day of granularity except:\r\n* When \"a day ago\" is visible, the granularity is at 0.5 days\r\n* If the journalist sees a new item on the page very early in the day, at say 1AM, then it must have been uploaded in the past hour.\r\n\r\nThe former issue could be solved by making 2 days mean 2.0-3.0 days, instead of the current 1.5-2.5 days, however half a day of granularity is about as good as could be achieved at the moment anyway.\r\n\r\nThe latter issue could be improved by replacing all date information with a \"new\" flag or solved by batching uploads, but subject to it being acceptable for users."},"comment":{"url":"https://api.github.com/repos/freedomofpress/securedrop/issues/comments/70553159","html_url":"https://github.com/freedomofpress/securedrop/pull/834#issuecomment-70553159","issue_url":"https://api.github.com/repos/freedomofpress/securedrop/issues/834","id":70553159,"user":{"login":"aliclark","id":85300,"avatar_url":"https://avatars.githubusercontent.com/u/85300?v=3","gravatar_id":"","url":"https://api.github.com/users/aliclark","html_url":"https://github.com/aliclark","followers_url":"https://api.github.com/users/aliclark/followers","following_url":"https://api.github.com/users/aliclark/following{/other_user}","gists_url":"https://api.github.com/users/aliclark/gists{/gist_id}","starred_url":"https://api.github.com/users/aliclark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliclark/subscriptions","organizations_url":"https://api.github.com/users/aliclark/orgs","repos_url":"https://api.github.com/users/aliclark/repos","events_url":"https://api.github.com/users/aliclark/events{/privacy}","received_events_url":"https://api.github.com/users/aliclark/received_events","type":"User","site_admin":false},"created_at":"2015-01-19T20:11:20Z","updated_at":"2015-01-19T20:11:20Z","body":"8dc6a91385a20265b8601a12976c22397a2988c3 may not be a good one actually - it changes utcnow() -> now(), but _relative_timestamp is still using utcnow().\r\n\r\nHowever just using UTC with date comparisons could give results that seem odd when viewed in the server's local time, eg. a source update that happened an hour ago might have happened yesterday in UTC terms, so would show \"1 day ago\" to the journalist..\r\n\r\nThe submissions should be correct since os_stat.st_mtime is returned in UTC, however thinking about it the local time truncation is probably not ideal.\r\n\r\nThis could be solved by adding a \"date-was-truncated-in-this-timezone\" column, but then it's starting to get complex :/\r\n\r\nThoughts? Is this the right approach generally? Rounding to 1 hour could avoid some of these problems, but probably doesn't help the original problem much"}}