rejetto forum

Date format for RSS feeds

0 Members and 1 Guest are viewing this topic.

Offline olliebean

  • Occasional poster
  • *
    • Posts: 2
    • View Profile
I have hfs.filelist.tpl set up to generate an RSS feed to access a folder of radio recordings as a podcast, which is working well apart from one problem. I have the pubDate set to %item-modified%, so that the item's date will be the date the file was recorded, but this isn't working and my podcatcher is displaying all items with a date of 01/01/1970.

A bit of online research has turned up that the format of the pubDate field ought to conform to RFC 822, as follows: "Wed, 20 Mar 2019 16:30:00 GMT" - but the %item-modified% symbol returns the date according to the OS Short date settings, and Windows does not have an option for the required format.

With a bit of experimentation, I've found that using the Long date, set to show as "20 Mar 2019", works - is there any way to use the Long date format, instead of the Short date format, for %item-modified%, or to otherwise customise the date format?



Offline olliebean

  • Occasional poster
  • *
    • Posts: 2
    • View Profile
Thanks, that's perfect! So just to confirm, the following code in the template specifies pubDate equal to %item-modified% with the full correct RFC 822 time/date format (assuming GMT time zone):

Code: [Select]
<pubDate>{.time|format=ddd, dd mmm yyyy hh:nn:ss|when=%item-modified-dt%.} GMT</pubDate>
This is now being correctly parsed by my podcatcher.