Yeah, leaving it as UTC was fine. My date vernacular was off in my original question, sorry.

Actually I was able to solve the problem a different way. I'm generating a SIMILE Timeline XML output from Solr, and it has a date- time-format option. Setting that to "iso8601" was all it took, leaving the Solr date output as-is. Substring extraction would have done the trick just fine though.

I'll be contributing these bits back to contrib/velocity or as part of SolrJS when I get things running nicely.

        Erik

On Nov 14, 2008, at 4:50 PM, Chris Hostetter wrote:

: for pragmatic "the desired output is straightforward XML" reasons. I need to : take a Solr date value in "2008-10-30T03:28:10.000Z" format and output it as a
: GMT formatted date like "Oct 30 2008 03:28:10 GMT-0600".
:
: Anyone got the incantation handy to make such a conversion in XSLT?

I can't think of anyway to do that since, 03:28:10.000Z is not equivilent to 03:28:10 GMT-0600 ... GMT-0600 is a very differnet timezone then UTC.

assuming you mean that you want a way to go from a UTC date in the
canonical format to an alternate format in a specified timezone, then i
think you need to use some of the XSL dateTime functions i've seen
documented here and there -- but i'm pretty sure they require XSL 2.0
(which probably means loading a new XSL library into solr)...

http://www.w3schools.com/Xpath/xpath_functions.asp#datetime

If you're okay leaving things in UTC, i've seen a lot of people use
substring to extract/reformat the constituent parts.



-Hoss

Reply via email to