Skip to content
Snippets Groups Projects
Commit e2a7ba82 authored by Alex Barth's avatar Alex Barth
Browse files

#618018 mcaudy: If pubDate is 0 or empty, use current time.

parent cc400b02
No related branches found
No related tags found
No related merge requests found
......@@ -44,8 +44,11 @@ class FeedsSimplePieParser extends FeedsParser {
$item['title'] = ($title = $simplepie_item->get_title()) ? $title : $this->createTitle($simplepie_item->get_content());
$item['description'] = $simplepie_item->get_content();
$item['url'] = html_entity_decode($simplepie_item->get_link());
// U = std. unix timestamp
// Use UNIX time. If no date is defined, fall back to FEEDS_REQUEST_TIME.
$item['timestamp'] = $simplepie_item->get_date("U");
if (empty($item['timestamp'])) {
$item['timestamp'] = FEEDS_REQUEST_TIME;
}
$item['guid'] = $simplepie_item->get_id();
// Use URL as GUID if there is no GUID.
if (empty($item['guid'])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment