RSS Feed date/time problems

2 posts by 2 authors in: Forums > CMS Builder
Last Post: November 13, 2009   (RSS)

Re: [bruno] RSS Feed date/time problems

By Luke - November 13, 2009

Hi bruno,

Thank you for your post.

While you're using the correct code to generate an RFC-822 date it looks like it's outputting the year with only two digits instead of four. This may have something to do with the version of PHP that's installed on your server.

Because of this we'll have to recreate the date using PHP date format characters. An example of RFC-822 dates can be found here http://feedvalidator.org/docs/error/InvalidRFC2822Date.html.

I was able to recreate one using the following code, so try using this for your <pubDate> instead:

<?php echo date("D, d M Y H:i:s O", strtotime($record['date'])) ?>

I hope this helps. Let me know if you have any more questions.

Cheers,
Luke
Luke Holzken
Product Development