Create an RSS feed
The timestamp of the channel's node should show the time that the feed content was last updated.
The timestamp of the channel's node is the time of the page load.
Joomla 3.6.4 fresh install
According to the RSS specification https://validator.w3.org/feed/docs/rss2.html#ltpubdategtSubelementOfLtitemgt, the channel's last build date node is defined as
"lastBuildDate The last time the content of the channel changed."
It should be possible to set the last build date within a custom built component.
Category | Libraries | ⇒ | com_newsfeeds Libraries |
I understand that it would be a huge job to get the code working as per RSS specification. However, as pubDate is an optional channel element, wouldn't it be better to not include this in the feed output, rather than including incorrect information?
Allowing the pub date value to be changed in a component would be a smaller change and a big improvement over the current hard coded situation. This would allow custom components to manage the pubdate of their feed if they choose to.
Status | New | ⇒ | Confirmed |
Fixed for 4.0.
In your view.feed.php
file (or any place really before the document is rendered) you'll be able to do this:
JFactory::getDocument()->lastBuildDate = new JDate('2017-02-04 17:11:00', new DateTimeZone('America/Chicago'));
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-02-04 23:12:04 |
Closed_By | ⇒ | mbabker |
this would require a big code change. You would need to load all the items, determine which is the newest and then use that date for the lastBuildDate - at this moment in time you are quite correct it always uses now https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/document/renderer/feed/rss.php#L81
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13008.