mauricerenck / kirby-podcaster

Kirby Podcast Plugin
https://podcaster-plugin.com
48 stars 4 forks source link

feedRSS - Wrong date format with config intl date handler #72

Closed batgithub closed 1 week ago

batgithub commented 4 months ago

Thanks for your plugin, it's really great 🙂

I created a podcast in french, on my website. I did config kirby date.handler with intl to have date in french. But it create wrong date in the RSS feed : 91, 31 3 2024 0:: instead of Sun, 31 Mar 2024 00:00:00 +0100.

batgithub commented 4 months ago

I did a quick fix with :

<?=$feed->xmlTag('pubDate', $episode->date()->toDate(new \IntlDateFormatter('en', pattern: 'E, MMM YYYY HH:mm:ss zz')));?> In snippets/itemp.php

and <lastBuildDate><?= \Kirby\Toolkit\Str::date($page->modified(), new \IntlDateFormatter('en', pattern: 'E, MMM YYYY HH:mm:ss zz'), 'en');?></lastBuildDate> in templates/podcasterfeed.php

I think it will be more resilient to precise the format in English on the rss feed.

batgithub commented 4 months ago

After bugs with spotify I finally found the right format :

    <?=$feed->xmlTag('pubDate', $episode->date()->toDate(new \IntlDateFormatter('en_US',
    \IntlDateFormatter::FULL,
    \IntlDateFormatter::FULL,
    'UTC',
    \IntlDateFormatter::GREGORIAN,
    "EEE, dd MMM yyyy HH:mm:ss 'GMT'")));?>
mauricerenck commented 1 week ago

Thank you for the contribution and sorry for the very late reply, I was so busy my other plugins that I procrastinated around this issue. It'll be fixed in the upcoming release.

mauricerenck commented 1 week ago

:tada: This issue has been resolved in version 3.2.8 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: