{"action":"created","issue":{"url":"https://api.github.com/repos/webmin/webmin/issues/392","repository_url":"https://api.github.com/repos/webmin/webmin","labels_url":"https://api.github.com/repos/webmin/webmin/issues/392/labels{/name}","comments_url":"https://api.github.com/repos/webmin/webmin/issues/392/comments","events_url":"https://api.github.com/repos/webmin/webmin/issues/392/events","html_url":"https://github.com/webmin/webmin/issues/392","id":161012452,"number":392,"title":"@time_now undefined in bandwidth-lib.pl","user":{"login":"swelljoe","id":99768,"avatar_url":"https://avatars.githubusercontent.com/u/99768?v=3","gravatar_id":"","url":"https://api.github.com/users/swelljoe","html_url":"https://github.com/swelljoe","followers_url":"https://api.github.com/users/swelljoe/followers","following_url":"https://api.github.com/users/swelljoe/following{/other_user}","gists_url":"https://api.github.com/users/swelljoe/gists{/gist_id}","starred_url":"https://api.github.com/users/swelljoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swelljoe/subscriptions","organizations_url":"https://api.github.com/users/swelljoe/orgs","repos_url":"https://api.github.com/users/swelljoe/repos","events_url":"https://api.github.com/users/swelljoe/events{/privacy}","received_events_url":"https://api.github.com/users/swelljoe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-18T07:44:45Z","updated_at":"2016-06-18T18:46:28Z","closed_at":"2016-06-18T18:46:28Z","body":"https://github.com/webmin/webmin/blob/master/bandwidth/bandwidth-lib.pl#L347\r\n\r\nIn these lines:\r\n\r\n```\r\nmy $tm = timelocal($sec, $min, $hr, $day,\r\n                               &month_to_number($mon), $time_now[5]);\r\nif ($tm > $time_now + 24*60*60) {\r\n   # Was really last year\r\n   $tm = timelocal($sec, $min, $hr, $day,\r\n                            &month_to_number($mon), $time_now[5]-1);\r\n```\r\n\r\nThe time_now array is undefined, as far as I can tell. $time_now is defined in this line from the arguments:\r\n\r\n```\r\nmy ($line, $hours, $time_now) = @_;\r\n```\r\n\r\nUnless that's a reference to an array instead of a scalar (but if it is it's not being used as such). I can't find any callers to this function, so I don't know exactly what's supposed to be happening.\r\n\r\nIn rotate.pl, @time_now gets set this way:\r\n\r\n````\r\n@time_now = localtime($time_now);\r\n```\r\nMaybe that's the right thing here?"},"comment":{"url":"https://api.github.com/repos/webmin/webmin/issues/comments/226958637","html_url":"https://github.com/webmin/webmin/issues/392#issuecomment-226958637","issue_url":"https://api.github.com/repos/webmin/webmin/issues/392","id":226958637,"user":{"login":"jcameron","id":102706,"avatar_url":"https://avatars.githubusercontent.com/u/102706?v=3","gravatar_id":"","url":"https://api.github.com/users/jcameron","html_url":"https://github.com/jcameron","followers_url":"https://api.github.com/users/jcameron/followers","following_url":"https://api.github.com/users/jcameron/following{/other_user}","gists_url":"https://api.github.com/users/jcameron/gists{/gist_id}","starred_url":"https://api.github.com/users/jcameron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcameron/subscriptions","organizations_url":"https://api.github.com/users/jcameron/orgs","repos_url":"https://api.github.com/users/jcameron/repos","events_url":"https://api.github.com/users/jcameron/events{/privacy}","received_events_url":"https://api.github.com/users/jcameron/received_events","type":"User","site_admin":false},"created_at":"2016-06-18T18:46:28Z","updated_at":"2016-06-18T18:46:28Z","body":"Yeah, that's correct - checking in a fix for this now.\r\n"}}
{"actor":{"display_login":"jcameron"}}