Skip to content

Commit

Permalink
Merge pull request #3 from marionitschke/patch-1
Browse files Browse the repository at this point in the history
Update BlogPost.php
  • Loading branch information
mgrundkoetter authored Nov 6, 2023
2 parents ad253d0 + bc2dcca commit c27c2d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Domain/Dto/BlogPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static function fromRss(\SimpleXMLElement $xmlElement): BlogPost
$post->setAuthor((string)$xmlElement->author);
$post->setLink((string)$xmlElement->link);
if (isset($xmlElement->{'dc:date'})) {
$post->setPubDate(\DateTime::createFromFormat(DATE_RSS, $xmlElement->{'dc:date'}));
$post->setPubDate(\DateTime::createFromFormat(DATE_ATOM, $xmlElement->{'dc:date'}));
} elseif (isset($xmlElement->pubDate)) {
$post->setPubDate(\DateTime::createFromFormat(DATE_RSS, $xmlElement->pubDate));
}
Expand Down

0 comments on commit c27c2d5

Please sign in to comment.