Tidy the next announce tracker status field

This commit is contained in:
Matt Joiner 2017-08-17 01:18:18 +10:00
parent e34681d5d5
commit 11aabc5a85
1 changed files with 3 additions and 4 deletions

View File

@ -26,11 +26,10 @@ func (ts *trackerScraper) statusLine() string {
fmt.Fprintf(&w, "%q\t%s\t%s",
ts.url,
func() string {
// return ts.lastAnnounce.Completed.Add(ts.lastAnnounce.Interval).Format("2006-01-02 15:04:05 -0700 MST")
na := ts.lastAnnounce.Completed.Add(ts.lastAnnounce.Interval).Sub(time.Now())
na /= time.Second
na *= time.Second
na := time.Until(ts.lastAnnounce.Completed.Add(ts.lastAnnounce.Interval))
if na > 0 {
na /= time.Second
na *= time.Second
return na.String()
} else {
return "anytime"