@@ -68,6 +68,8 @@ func (t *DefaultRSSTranslator) translateFeedItem(rssItem *rss.Item) (item *Item)
6868 item .Link = t .translateItemLink (rssItem )
6969 item .Published = t .translateItemPublished (rssItem )
7070 item .PublishedParsed = t .translateItemPublishedParsed (rssItem )
71+ item .Updated = t .translateItemUpdated (rssItem )
72+ item .UpdatedParsed = t .translateItemUpdatedParsed (rssItem )
7173 item .Author = t .translateItemAuthor (rssItem )
7274 item .GUID = t .translateItemGUID (rssItem )
7375 item .Image = t .translateItemImage (rssItem )
@@ -280,18 +282,20 @@ func (t *DefaultRSSTranslator) translateItemLink(rssItem *rss.Item) (link string
280282}
281283
282284func (t * DefaultRSSTranslator ) translateItemUpdated (rssItem * rss.Item ) (updated string ) {
283- if rssItem .DublinCoreExt != nil && rssItem .DublinCoreExt .Date != nil {
285+ if updatedVal , ok := t .hasAtomExtensionsForKey (rssItem , "updated" ); ok {
286+ updated = t .atomTranslator .translateItemUpdated (updatedVal )
287+ } else if rssItem .DublinCoreExt != nil && rssItem .DublinCoreExt .Date != nil {
284288 updated = t .firstEntry (rssItem .DublinCoreExt .Date )
285289 }
286290 return updated
287291}
288292
289293func (t * DefaultRSSTranslator ) translateItemUpdatedParsed (rssItem * rss.Item ) (updated * time.Time ) {
290- if rssItem .DublinCoreExt != nil && rssItem .DublinCoreExt .Date != nil {
291- updatedText := t .firstEntry (rssItem .DublinCoreExt .Date )
294+ if updatedText := t .translateItemUpdated (rssItem ); updatedText != "" {
292295 updatedDate , err := shared .ParseDate (updatedText )
293296 if err == nil {
294- updated = & updatedDate
297+ utcDate := updatedDate .UTC ()
298+ updated = & utcDate
295299 }
296300 }
297301 return
0 commit comments