Commit b1bb2d5c authored by Dries's avatar Dries

- Patch #38336 by rcwoolley: parse dates in Atom feeds.

parent 12c5416d
......@@ -575,6 +575,9 @@ function aggregator_parse_feed(&$data, $feed) {
else if ($item['DCTERMS:ISSUED']) $date = $item['DCTERMS:ISSUED']; // Dublin core
else if ($item['DCTERMS:CREATED']) $date = $item['DCTERMS:CREATED']; // Dublin core
else if ($item['DCTERMS:MODIFIED']) $date = $item['DCTERMS:MODIFIED']; // Dublin core
else if ($item['ISSUED']) $date = $item['ISSUED']; // Atom XML
else if ($item['CREATED']) $date = $item['CREATED']; // Atom XML
else if ($item['MODIFIED']) $date = $item['MODIFIED']; // Atom XML
else $date = 'now';
$timestamp = strtotime($date); // strtotime() returns -1 on failure
......
......@@ -575,6 +575,9 @@ function aggregator_parse_feed(&$data, $feed) {
else if ($item['DCTERMS:ISSUED']) $date = $item['DCTERMS:ISSUED']; // Dublin core
else if ($item['DCTERMS:CREATED']) $date = $item['DCTERMS:CREATED']; // Dublin core
else if ($item['DCTERMS:MODIFIED']) $date = $item['DCTERMS:MODIFIED']; // Dublin core
else if ($item['ISSUED']) $date = $item['ISSUED']; // Atom XML
else if ($item['CREATED']) $date = $item['CREATED']; // Atom XML
else if ($item['MODIFIED']) $date = $item['MODIFIED']; // Atom XML
else $date = 'now';
$timestamp = strtotime($date); // strtotime() returns -1 on failure
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment