Display correct UTC pubdate in RSS Feed plugin

Hi all, I’m using the RSS feed plugin for Kirby to generate a feed which I’m then sending over to Mailchimp for newsletter distribution.

I’m running into an error because I want to send the newsletter out daily at 9:00pm EST which works out to 01:00am UTC. But in the RSS feed, my pubdate displays as “00:00:00 +0000” on the publication day regardless of when the article was created, which then messes up the RSS 24hr send because it thinks it was posted more than 24hrs prior.

How can I make sure that the pubdate in my RSS feed is reflecting the time at which the article was actually published?

How have you configured the feed? Have you set the datefield option to the name of your date field (default is date).

Have you set a date option in your config.php?

The feed isn’t configured, datefield shows as default 'datefield' => 'date',

No date option in config… I’m pretty new at this.

Is there a way to give the article blueprint a ‘time’ for the feed to pull from?

What is the name of your datefield in your article blueprint? If it is date, everything should be fine. To add a time, you can use the date time field.

But the feed should show a correct publication date without a given time. This is what is looks like with the feed plugin installed in a fresh StarterKit:

Could you post your article blueprint?

The date is working fine!

I just need the UTC timecode of what time the article was created to display correctly in the XML feed, instead of 00:00:00. This is so my Mailchimp newsletter works properly, it’s time-sensitive.

So would I need to add a datetime field in the blueprint and then change the datefield in the feed plugin to “datetime” ?

This is my blueprint, just the default:

Yes, Use a datetime field type.

And don’t forget to set your time zone in config.php (e.g. c::set('timezone','Europe/Brussels');). If you don’t do this, then PHP would render the time as the time zone has been setup on your webserver.

1 Like

Perfect! It’s all working now. thanks so much for the help!