koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-devel] Dates in Koha's RSS


From: Owen Leonard
Subject: [Koha-devel] Dates in Koha's RSS
Date: Mon Aug 9 12:45:04 2004

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]