Closed (fixed)
Project:
Feeds XPath Parser
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
3 Nov 2010 at 15:00 UTC
Updated:
31 Mar 2011 at 13:37 UTC
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
Comment #1
podox commentedPossible Feeds issue?
#860942: Convert dates mapped to node created or updated.
Comment #2
twistor commentedWhat's the status of this issue?
Comment #3
podox commentedThanks 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.
Comment #4
twistor commentedAh 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?
Comment #5
podox commentedNeither 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.
Comment #6
podox commentedQuick update. I switched to Drupal 7 and this was magically fixed without Feeds Tamper! Thanks.
Comment #7
twistor commentedComment #9
bartezz commentedhttp://drupal.org/node/1097104#comment-4286692