From e822d510bad3cc7fd7df86e8a7163f99790818c4 Mon Sep 17 00:00:00 2001 From: Loweel Date: Sun, 4 May 2025 19:00:46 +0200 Subject: [PATCH] Taking time from file lastmodified. --- rss-xml.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rss-xml.go b/rss-xml.go index 47cff08..1a1f464 100644 --- a/rss-xml.go +++ b/rss-xml.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "log" "os" "path/filepath" @@ -43,10 +44,16 @@ func generateRSS() error { } epBaseImg := baseURL + "/covers/" + strip + ".jpg" + timepub, err := time.Parse(time.RFC1123, ep.PubDate) + if err != nil { + fmt.Println("Errore nella conversione:", err) + timepub = time.Now() + } + item := podcast.Item{ Title: ep.Title, Description: ep.Description, - PubDate: &timeNow, + PubDate: &timepub, Enclosure: &podcast.Enclosure{ URL: epBaseUrl, Type: podcast.MP3,