alexdebril / rss-atom-bundle

RSS and Atom Bundle for Symfony
MIT License
139 stars 49 forks source link

How to change DateTime format (RSS) #202

Closed JAIC-be closed 3 years ago

JAIC-be commented 3 years ago

Hiya,

How do we change the DateTime format for the RSS feed?

When viewing the feed in ATOM, it displays: <updated>2020-11-23T12:31:28+00:00</updated> (which is what we want), while RSS displays; <pubDate>Mon, 23 Nov 2020 20:45:29 +0000</pubDate> which is undesirable.

Thank you.

alexdebril commented 3 years ago

You'll have to call this : https://github.com/alexdebril/feed-io/blob/master/src/FeedIo/DateRuleAbstract.php#L61

But are you sure you want to do this ? RFC822 is the format specified in RSS Specifications https://validator.w3.org/feed/docs/rss2.html , that's why you have this.

JAIC-be commented 3 years ago

Thank you for the link.

Just got back with the people that need to pull the feed... Their documentation was in error as they copy paste the required result from the ATOM feed into the RSS and forgot to change it <_<, you were right, thanks ;)