repos / pico

pico services mono repo
git clone https://github.com/picosh/pico.git

commit
7ebe845
parent
f685533
author
Eric Bower
date
2024-09-23 13:39:43 -0400 EDT
fix(feeds): days until expiration date
1 files changed,  +1, -1
M feeds/cron.go
+1, -1
1@@ -334,7 +334,7 @@ func (f *Fetcher) FetchAll(logger *slog.Logger, urls []string, inlineContent boo
2 	fp := gofeed.NewParser()
3 	daysLeft := "90"
4 	if post.ExpiresAt != nil {
5-		diff := time.Since(*post.ExpiresAt)
6+		diff := time.Until(*post.ExpiresAt)
7 		daysLeft = fmt.Sprintf("%f", math.Ceil(diff.Hours()/24))
8 	}
9 	feeds := &DigestFeed{