Get the date for <updated> from the newest entry

This commit is contained in:
blank X 2021-08-10 22:19:04 +07:00
parent c1cac50095
commit 672c6e67ec
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 1 additions and 1 deletions

View File

@ -330,7 +330,7 @@ func main() {
if len(aw.Items) == 0 {
feed.Updated = time.Now().Format(time.RFC3339)
} else {
feed.Updated = aw.Items[0].Date.Format(time.RFC3339)
feed.Updated = aw.Items[len(aw.Items) - 1].Date.Format(time.RFC3339)
}
for i := len(aw.Items); i != 0; i-- {
item := aw.Items[i - 1]