You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Gora Mohanty <go...@mimirtech.com> on 2011/11/17 14:39:53 UTC

Re: ISO8601 Date format

On Thu, Nov 17, 2011 at 6:06 PM, Gerke, Axel
<Ax...@haufe-lexware.com> wrote:
> Hello,
>
> due a different Bug in another system, we stored a date in a datefield
> with an value like "999-12-31T23:00:00Z". As you can see in the schema
> browser below, solr stores it correct with four digits but in a response
> the leading zero is missing.
>
> My question is: is a three digit year a valid ISO-8601 date format for
> the response or is this a bug? Because other languages (f.e. python) are
> throwing an exception with a three digit year?!

http://www.w3.org/TR/NOTE-datetime , and http://en.wikipedia.org/wiki/ISO_8601
seem to indicate that a four-digit year with leading zeroes is required. To
quote from the "General principles" section in the latter reference:
"Each date and
time value has a fixed number of digits that must be padded with leading zeros".

Regards,
Gora