I'm trying out Koha's RSS functions, and finding that the feed which rss.pl generates is not valid because of the format of the date: "line 13, column 40: lastBuildDate must be an RFC-822 date <lastBuildDate>Thu Aug 5 13:00:34 2004</lastBuildDate>" Here's the validator's explanation: "Invalid date. The value specified must meet the Date and Time specifications as defined by RFC822, with the exception that the year should be expressed as four digits. Solution Change the date format to comply with RFC822. Here are examples of valid RFC822 dates: <pubDate>Wed, 02 Oct 2002 08:00:00 EST</pubDate> <pubDate>Wed, 02 Oct 2002 13:00:00 GMT</pubDate> <pubDate>Wed, 02 Oct 2002 15:00:00 +0200</pubDate>" The script generates the date here: sub getDate { my $date = localtime(timelocal(localtime)); return $date; } ...which is where I assume the date formatting should take place, but it's beyond me. I assume it's not that difficult for those who know Perl. Can someone offer a suggestion? Thanks, Owen
On 2004-08-09 20:40:03 +0100 Owen Leonard <oleonard@athenscounty.lib.oh.us> wrote:
"line 13, column 40: lastBuildDate must be an RFC-822 date
There is no lastBuildDate in RSS 1.0, which I think is still the last working group version (as opposed to Winer's fork 2.0, but please let me know if not). What validator are you using and is rsskoha producing something other than 1.0?
sub getDate { my $date = localtime(timelocal(localtime)); return $date; }
...which is where I assume the date formatting should take place, but it's beyond me. I assume it's not that difficult for those who know Perl. Can someone offer a suggestion?
Try the strftime function in the POSIX module on the whole localtime(...) thing. "perldoc POSIX" for help. -- MJR/slef My Opinion Only and not of any group I know http://www.ttllp.co.uk/ for creative copyleft computing Please email about: BT alternative for line rental+DSL; Education on SMEs+EU FP6; office filing that works fast
participants (2)
-
MJ Ray -
Owen Leonard