Skip to content

Commit

Permalink
Fix date format to RFC2822
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansl committed Jun 15, 2021
1 parent 3a59735 commit 7178ed9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NewsPodcasts.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ protected static function generateFiles($arrFeed): void
$objFeed->published = $arrFeed['tstamp'];

$objDateTime = new \DateTime();
$objFeed->lastBuildDate = $objDateTime->format(\DateTime::ATOM);
$objFeed->lastBuildDate = $objDateTime->format(\DateTime::RFC2822);

//Add Feed Image
$objFile = \FilesModel::findByUuid($arrFeed['image']);
Expand Down Expand Up @@ -284,7 +284,7 @@ protected static function generateFiles($arrFeed): void
);

$objDateTime = new \DateTime();
$objItem->published = $objDateTime->setTimestamp((int) $objPodcasts->date)->format(\DateTime::ATOM);
$objItem->published = $objDateTime->setTimestamp((int) $objPodcasts->date)->format(\DateTime::RFC2822);
$objAuthor = $objPodcasts->getRelated('author');
$objItem->author = $objAuthor->name;
$objItem->teaser = self::cleanHtml($objPodcasts->teaser ?? $objPodcasts->description);
Expand Down

0 comments on commit 7178ed9

Please sign in to comment.