Thanks, Sudhir. I didn't think to search the archives because it wasn't really an XWiki problem. I don't know why it didn't occur to me that if I posted it here, someone else might have - as witness the 'off-topic' caveat when you did. I'm more than fuddled by this. I've found something that works, but I can't begin to explain why. To date, here is how things have fallen out since I sent my note and before reading your reply: First, I tried quoting the 'T', as you suggest, having found this example in the Javadoc for java.text.DateFormat earlier. This satisfied SimpleDateFormat (Duh!, right? SimpleDateFormat.compile doesn't care what's quoted...), and produced identical XML output to the unquoted 'T' which had satisfied the RSS reader, but now failed, producing an invalid-date indication in the displayed date field. If I were a drinking man, I might start thinking of reaching for the bottle. Next, I hit on the idea (for no good reason I can think of; call it "divine inspiration" - or in shorter form: "despiration") of calling $xwiki.formatDate on the Date object, specifying no format so as to use the default from the XWiki preferences (which, I suspect, is exactly how the string version of the element is created, at least when it's an XWiki Object field). This produces XML output identical to the original format that was rejected by the RSS reader, but which is now accepted and reformatted correctly. If I were a drinking man, by this time I'd be singing off key and making lewd suggestions to any remotely desirable lamppost that crossed my path... brain[sic]
-----Original Message----- From: Sudhir Rao [mailto:[email protected]] Sent: Tuesday, June 20, 2006 5:21 PM To: [email protected] Subject: Re: [xwiki-users] RSS Date problems
Try this pattern.. "yyyy-MM-dd'T'HH:mm:ss". You might be missing the single quotes in there.
This has been an issue for a while...
http://mail-archive.objectweb.org/xwiki-users/2005-06/msg00033.html
-sudhir
On 6/20/06, THOMAS, BRIAN M (SBCSI) <[email protected]> wrote:
One of my favorite RSS display programs is picky, and displays (Invalid Date) on the items' date entries. Investigation into this revealed that it insists on the correct format of the dc:date element in the item's header.
This is specified by ISO 8601, which in turn refers to the W3C standards, which indicate that the separator between the date and time fields, which for most sane people is a space, must be an upper-case 'T'. I dutifully changed XWiki.WebRssCode and XWiki.BlogRssCode, et voilĂ : no more error, just nice date/time fields.
Life is good - until my sysadmin starts complaining about megabytes per minute of logfile accumulation, resulting from 20 60+-line exception stack traces per RSS request. I look at the logs and what do I see? Each one is a complaint from java.text.SimpleDateFormat.compile:
java.lang.IllegalArgumentException: Illegal pattern character 'T'
I have sought in vain for how to get this 'T' into the default pattern character array. It looks like it could be one of the things I can set in the Locale, but I have so far failed to figure out where the defaults are located or what key they have.
Any clues?
Brian M. Thomas - Senior Technical Architect AT&T Services, Inc. One SBC Center, Room 24D3 St. Louis, MO 63101 314 235 3141
-- 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