diff --git a/src/rss.nim b/src/rss.nim index d013f2b..08ef60c 100644 --- a/src/rss.nim +++ b/src/rss.nim @@ -50,6 +50,20 @@ proc mixRssFeeds*( case feed.kind of Atom: entries.add parseAtom(fetched) + + entries[^1].items = entries[^1].items.mapIt( + block: + var item = it + if feed.timeFormat.len != 0 and item.pubDate.isSome(): + # if the IDE screams at you here, ignore it + item.pubdate = + some(parse(item.pubDate.get(), feed.timeFormat).format(atomTimeFormat)) + if item.updated.isSome(): + item.updated = + some(parse(item.updated.get(), feed.timeFormat).format(atomTimeFormat)) + + item + ) of RSSv2: entries.add parseRss(fetched)