[Koha-devel] Dates in Koha's RSS

MJ Ray mjr at dsl.pipex.com
Tue Aug 10 18:59:14 CEST 2004


On 2004-08-09 22:43:58 +0100 Owen Leonard 
<oleonard at athenscounty.lib.oh.us> wrote:

>> Try the strftime function in the POSIX module on the whole 
>> localtime(...) 
>> thing. "perldoc POSIX" for help.
> I'd be happy to upgrade the rss templates to conform to RSS 1.0 if 
> someone 
> can supply me with the right Perl code to format the date correctly.

For RSS 1.0 (http://purl.org/rss/1.0/spec), the date would be in a 
Dublin Core field (http://web.resource.org/rss/1.0/modules/dc/). I 
think the most likely one is dc:date, which is a W3CDTF 
(http://www.w3.org/TR/NOTE-datetime). The perl code is

use POSIX;
# some other stuff
$date = strftime("%Y-%m-%dT%H:%M:%SZ",gmtime());

print $date."\n"; # is what I used to test this. You can pipe this to 
perl to test.

I look forward to hearing about RSS 1.0 support :-)

-- 
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





More information about the Koha-devel mailing list