summaryrefslogtreecommitdiffstats
path: root/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php')
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php b/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php
index 005691f48..b265656ac 100644
--- a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php
+++ b/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php
@@ -139,11 +139,11 @@ class Rss20 extends Parser
$publish_date = XmlParser::getXPathResult($xml, 'channel/pubDate');
$update_date = XmlParser::getXPathResult($xml, 'channel/lastBuildDate');
- $published = !empty($publish_date) ? $this->date->getDateTime((string) current($publish_date)) : null;
- $updated = !empty($update_date) ? $this->date->getDateTime((string) current($update_date)) : null;
+ $published = !empty($publish_date) ? $this->getDateParser()->getDateTime((string) current($publish_date)) : null;
+ $updated = !empty($update_date) ? $this->getDateParser()->getDateTime((string) current($update_date)) : null;
if ($published === null && $updated === null) {
- $feed->date = $this->date->getCurrentDateTime(); // We use the current date if there is no date for the feed
+ $feed->date = $this->getDateParser()->getCurrentDateTime(); // We use the current date if there is no date for the feed
} elseif ($published !== null && $updated !== null) {
$feed->date = max($published, $updated); // We use the most recent date between published and updated
} else {
@@ -162,7 +162,7 @@ class Rss20 extends Parser
{
$date = XmlParser::getXPathResult($entry, 'pubDate');
- $item->date = empty($date) ? $feed->getDate() : $this->date->getDateTime((string) current($date));
+ $item->date = empty($date) ? $feed->getDate() : $this->getDateParser()->getDateTime((string) current($date));
}
/**