I'm having trouble mapping the pubDate element in an RSS feed to the node published date. Most other elements are mapped correctly (title, description etc.) using this great parser, but the node published is are being set at Thu, 01/01/1970 - 00:00. If I use the Common Syndication Parser, the date is mapped correctly.

Here is an example of the RSS feed I am trying to import:

<rss>
   <channel>
      <item>
         <title>Example Node 1</title>
         <pubDate>Tue, 14 Sep 2010 13:07:10 +0100</pubDate>
      </item>
      <item>
         <title>Example Node 2</title>
         <pubDate>Mon, 16 Aug 2010 17:05:50 +0100</pubDate>
      </item>
   </channel>
</rss>

Comments

podox’s picture

twistor’s picture

What's the status of this issue?

podox’s picture

Category: support » bug

Thanks for looking at this. Here is an example feed: http://rss.oucs.ox.ac.uk/oxitems/generatersstwo2.php?channel_name=engfac...

Most feed item elements import and map correctly (title maps to node title, description maps to node body etc.). The pubDate element in the feed item cannot be mapped to the node published date - instead you get 1 Jan 1970.

I believe pubDate is in the correct format, so this is either a Feeds bug or a Feeds XPath Parser bug.

twistor’s picture

Ah I see. The node published field accepts unix timestamps if I'm not mistaken. Feeds CommonSyndicationParser will convert dates for you to the appropriate format. XPath Parser has no knowledge of the type of data it's handling. A date conversion plugin is in the works for Feeds Tamper. That should handle this. Seeing as this is an rss feed, why not use CommonSyndicationParser or SimplePie?

podox’s picture

Neither CommonSyndicationParser nor SimplePie allow me to extract and map the non-standard elements of the feed (itunes:subtitle; itunes:duration; media:credit etc.). I could probably modify them to do so, but Feeds XPath Parser seemed to be an ideal out-of-the-box solution.

Thanks for all your hard work with this module. Looking forward to the Feeds Tamper plugin.

podox’s picture

Quick update. I switched to Drupal 7 and this was magically fixed without Feeds Tamper! Thanks.

twistor’s picture

Assigned: Unassigned » twistor
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

bartezz’s picture