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

4.7.x
Dries Buytaert 2005-11-24 20:20:53 +00:00
parent 12c5416dbf
commit b1bb2d5c60
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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