{"action":"created","issue":{"url":"https://api.github.com/repos/MissAllSunday/ExpireAttachments/issues/1","labels_url":"https://api.github.com/repos/MissAllSunday/ExpireAttachments/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/MissAllSunday/ExpireAttachments/issues/1/comments","events_url":"https://api.github.com/repos/MissAllSunday/ExpireAttachments/issues/1/events","html_url":"https://github.com/MissAllSunday/ExpireAttachments/pull/1","id":66298121,"number":1,"title":"Fix expired file selection","user":{"login":"KolyaKorruptis","id":4076947,"avatar_url":"https://avatars.githubusercontent.com/u/4076947?v=3","gravatar_id":"","url":"https://api.github.com/users/KolyaKorruptis","html_url":"https://github.com/KolyaKorruptis","followers_url":"https://api.github.com/users/KolyaKorruptis/followers","following_url":"https://api.github.com/users/KolyaKorruptis/following{/other_user}","gists_url":"https://api.github.com/users/KolyaKorruptis/gists{/gist_id}","starred_url":"https://api.github.com/users/KolyaKorruptis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KolyaKorruptis/subscriptions","organizations_url":"https://api.github.com/users/KolyaKorruptis/orgs","repos_url":"https://api.github.com/users/KolyaKorruptis/repos","events_url":"https://api.github.com/users/KolyaKorruptis/events{/privacy}","received_events_url":"https://api.github.com/users/KolyaKorruptis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-04T09:36:08Z","updated_at":"2015-06-15T14:28:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/MissAllSunday/ExpireAttachments/pulls/1","html_url":"https://github.com/MissAllSunday/ExpireAttachments/pull/1","diff_url":"https://github.com/MissAllSunday/ExpireAttachments/pull/1.diff","patch_url":"https://github.com/MissAllSunday/ExpireAttachments/pull/1.patch"},"body":"The previous code assumed that the scheduled task would run daily at 12:00. None of these are necessarily true."},"comment":{"url":"https://api.github.com/repos/MissAllSunday/ExpireAttachments/issues/comments/112089671","html_url":"https://github.com/MissAllSunday/ExpireAttachments/pull/1#issuecomment-112089671","issue_url":"https://api.github.com/repos/MissAllSunday/ExpireAttachments/issues/1","id":112089671,"user":{"login":"KolyaKorruptis","id":4076947,"avatar_url":"https://avatars.githubusercontent.com/u/4076947?v=3","gravatar_id":"","url":"https://api.github.com/users/KolyaKorruptis","html_url":"https://github.com/KolyaKorruptis","followers_url":"https://api.github.com/users/KolyaKorruptis/followers","following_url":"https://api.github.com/users/KolyaKorruptis/following{/other_user}","gists_url":"https://api.github.com/users/KolyaKorruptis/gists{/gist_id}","starred_url":"https://api.github.com/users/KolyaKorruptis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KolyaKorruptis/subscriptions","organizations_url":"https://api.github.com/users/KolyaKorruptis/orgs","repos_url":"https://api.github.com/users/KolyaKorruptis/repos","events_url":"https://api.github.com/users/KolyaKorruptis/events{/privacy}","received_events_url":"https://api.github.com/users/KolyaKorruptis/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T14:28:55Z","updated_at":"2015-06-15T14:28:55Z","body":"Look at your code where you are using these values:\r\nWHERE expire_date BETWEEN {int:range_to} AND {int:range_from}\r\n\r\nYou are deleting only those attachments whose expire date is between 12h in the past and 12h in the future. \r\nBut we want to expire ALL attachments whose expire date lies in the past (and none in the future). Therefore we check from the beginning of unix time to now."}}