Actually I saw that code. The simplest fix I could figure was this... In the page http://.../xwiki/bin/edit/XWiki/WebRssCode, I replaced this line <dc:date>$currentdoc.date</dc:date> with <dc:date>$xwiki.formatDate($currentdoc.date, "yyyy-MM-dd'T'HH:mm:ss")</dc:date> The fix however omits the timezone. There is java code at http://www.dpawson.co.uk/relaxng/schema/datetime.html which handles the timezone as well. The SimpleDateFormat pattern "yyyy-MM-dd'T'HH:mm:ss.SSSZ" is close as it gives 2005-06-29T17:20:46.171-0800 This however does not work because of the missing colon. It needs to be 2005-06-29T17:20:46.171-08:00 The simplest way seems to be to use commons-lang utilities DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format(new Date()) Since commons-lang is already part of the distribution is there a easy way to add this code? I just don't know how to incorporate it in here at this point due to unfamiliarity with velocity, groovy etc. Thanks very much. regards Sudhir On 6/29/05, Ludovic Dubost <[email protected]> wrote:
Yes.. You need to customize the code in BlogRssCode
http://www.xwiki.com/xwiki/bin/view/XWiki/BlogRssCode?xpage=code
You can get this code and put it in your wiki and modify it. The line <dc:date>$currentdoc.display("date", "view", $currentobj)</dc:date> Should be changed to some conversion.. I'm not sure which one though If you send us some java code that does the conversion and right formatting we can adapt it for the scripting
Ludovic
Sudhir Rao a écrit :
Is there any easy way to change the timestamp format in the rss feed which gets generated without modifying xwiki source code?
The field <dc:date>Tue Jun 28 16:31:33 PDT 2005</dc:date> should have been formatted as per the dateTime spec at http://www.w3.org/TR/xmlschema-2/#dateTime
The current behavior seems to throw off the date/time sorting in RSS readers as they just ignore the value.
A SimpleDateFormat conversion has been given here..
http://lists.xml.org/archives/xml-dev/200311/msg00153.html which uses the format "yyyy-MM-dd'T'HH:mm:ss,SSS'Z'"
Any thoughts?
-Sudhir
------------------------------------------------------------------------
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Ludovic Dubost XPertNet: http://www.xpertnet.fr/ Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost AIM: nvludo Yahoo: ludovic