Skip to content
Snippets Groups Projects
Commit 15b40d7e authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #70725 by ahoeben: recognized more Atom dates.

parent b8594062
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -886,6 +886,8 @@ function aggregator_parse_feed(&$data, $feed) {
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 if ($item['PUBLISHED']) $date = $item['PUBLISHED']; // Atom XML
else if ($item['UPDATED']) $date = $item['UPDATED']; // Atom XML
else $date = 'now';
$timestamp = strtotime($date); // As of PHP 5.1.0, strtotime returns FALSE on failure instead of -1.
......
......@@ -886,6 +886,8 @@ function aggregator_parse_feed(&$data, $feed) {
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 if ($item['PUBLISHED']) $date = $item['PUBLISHED']; // Atom XML
else if ($item['UPDATED']) $date = $item['UPDATED']; // Atom XML
else $date = 'now';
$timestamp = strtotime($date); // As of PHP 5.1.0, strtotime returns FALSE on failure instead of -1.
......
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