Skip to content

Commit

Permalink
fix: use new date method for build date
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricerenck committed Sep 26, 2024
1 parent 1d3d8e1 commit f1b0037
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion snippets/xml/item.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
$feed = new Feed();
$useUuid = option('mauricerenck.podcaster.feed.uuid', false);
$audioFile = $feed->getAudioFile($episode);
$pubDate = $feed->getRssDate($episode->date()->modified()->toDate());
$pubDate = $feed->getRssDate($episode->date()->toDate());

if(is_null($audioFile)) {
return;
Expand Down
3 changes: 2 additions & 1 deletion templates/podcasterfeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
$feed = new Feed();
kirby()->response()->type('application/rss+xml');
//kirby()->response()->type('text/xml'); // TODO for debugging
$buildDate = $feed->getRssDate($page->modified());

?>
<?php snippet('podcaster-feed-header'); ?>
Expand All @@ -30,7 +31,7 @@
<atom:link href="<?=Xml::encode($page->atomLink());?>" rel="self" type="application/rss+xml"
title="<?php echo Xml::encode($page->podcasterTitle()); ?>"/>

<lastBuildDate><?=$page->modified(DATE_RSS);?></lastBuildDate>
<lastBuildDate><?=$buildDate;?></lastBuildDate>
<generator>Kirby Podcaster Plugin <?= $podcast->getPluginVersion(); ?></generator>

<?=$feed->xmlTag('title', $page->podcasterTitle());?>
Expand Down

0 comments on commit f1b0037

Please sign in to comment.