- Patch #38336 by rcwoolley: parse dates in Atom feeds.
parent
12c5416dbf
commit
b1bb2d5c60
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue