{"action":"created","issue":{"url":"https://api.github.com/repos/xenolf/lego/issues/59","labels_url":"https://api.github.com/repos/xenolf/lego/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/xenolf/lego/issues/59/comments","events_url":"https://api.github.com/repos/xenolf/lego/issues/59/events","html_url":"https://github.com/xenolf/lego/issues/59","id":123300179,"number":59,"title":"renew --days logic backwards","user":{"login":"colinn","id":366359,"avatar_url":"https://avatars.githubusercontent.com/u/366359?v=3","gravatar_id":"","url":"https://api.github.com/users/colinn","html_url":"https://github.com/colinn","followers_url":"https://api.github.com/users/colinn/followers","following_url":"https://api.github.com/users/colinn/following{/other_user}","gists_url":"https://api.github.com/users/colinn/gists{/gist_id}","starred_url":"https://api.github.com/users/colinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colinn/subscriptions","organizations_url":"https://api.github.com/users/colinn/orgs","repos_url":"https://api.github.com/users/colinn/repos","events_url":"https://api.github.com/users/colinn/events{/privacy}","received_events_url":"https://api.github.com/users/colinn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-21T15:36:08Z","updated_at":"2015-12-21T20:12:05Z","closed_at":"2015-12-21T20:12:05Z","body":"The [logic](https://github.com/xenolf/lego/blob/master/cli_handlers.go#L200) of the --days parameter seems reversed to me:\r\n\r\n     if int(expTime.Sub(time.Now()).Hours() / 24.0) <= c.Int(\"days\") {\r\n\t\t\treturn\r\n     }\r\n\r\nThis appears to renew the certificate only if it is NOT about to expire.\r\n\r\nIs this the behaviour intended, or a typo?"},"comment":{"url":"https://api.github.com/repos/xenolf/lego/issues/comments/166406101","html_url":"https://github.com/xenolf/lego/issues/59#issuecomment-166406101","issue_url":"https://api.github.com/repos/xenolf/lego/issues/59","id":166406101,"user":{"login":"xenolf","id":578256,"avatar_url":"https://avatars.githubusercontent.com/u/578256?v=3","gravatar_id":"","url":"https://api.github.com/users/xenolf","html_url":"https://github.com/xenolf","followers_url":"https://api.github.com/users/xenolf/followers","following_url":"https://api.github.com/users/xenolf/following{/other_user}","gists_url":"https://api.github.com/users/xenolf/gists{/gist_id}","starred_url":"https://api.github.com/users/xenolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xenolf/subscriptions","organizations_url":"https://api.github.com/users/xenolf/orgs","repos_url":"https://api.github.com/users/xenolf/repos","events_url":"https://api.github.com/users/xenolf/events{/privacy}","received_events_url":"https://api.github.com/users/xenolf/received_events","type":"User","site_admin":false},"created_at":"2015-12-21T20:12:05Z","updated_at":"2015-12-21T20:12:05Z","body":"You are right, the comparison was wrong.\r\nFixed in 0c8bd2962e9f5f8958b7a9155af3cea1b6907bf4"}}