[jira] [Commented] (SOLR-1899) dates prior to 1000AD are not formatted properly in responses

2011-09-16 Thread Hoss Man (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106613#comment-13106613
 ] 

Hoss Man commented on SOLR-1899:


as Nicklas pointed out on the solr-user mailing list, there are really 3 
distinct problems here, and there is no reason to get bogged down in a trying 
to find one hollistic solution for all of them when we can make incremental 
progress on fixing them individually.

so i've spun this off into 3 sub issues.

> dates prior to 1000AD are not formatted properly in responses
> -
>
> Key: SOLR-1899
> URL: https://issues.apache.org/jira/browse/SOLR-1899
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 1.1.0, 1.2, 1.3, 1.4
>Reporter: Hoss Man
>Assignee: Hoss Man
> Attachments: SOLR-1899.patch
>
>
> As noted on the mailing list, if a document is added to solr with a date 
> field such as "0001-01-01T00:00:00Z" then when that document is returned by a 
> search the year will be improperly formated as "1-01-01T00:00:00Z"

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-1899) dates prior to 1000AD are not formatted properly in responses

2011-05-06 Thread Hoss Man (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13030272#comment-13030272
 ] 

Hoss Man commented on SOLR-1899:


Status update.

After doing some more research: 

* it seems pretty clear that SimpleDateFormat is fundamentally incapable of 
formatting negative years (other then using an Era string).

* the parseDateTime/printDateTime methods in javax.xml.bind.DatatypeConverter 
*should* be the perfect solution -- they specifically exist for dealing with 
XSD dates.  But in testing they seem to be completely broken as far as the 
milliseconds and the requirement that "The fractional second string, if 
present, must not end in '0';"

* based on all the recommendations I found online, i started investigated 
JodaTime.  It has an ISODateTimeFormat factory class that looked promising, but 
it doesn't seem to support any implementations that are designed for dealing 
with the canonical form, nor did i have much look using the JodaTime 
DateTimeFormatterBuilder API to construct one.  details are here: 
https://sourceforge.net/projects/joda-time/forums/forum/337835/topic/4519752

At this point, barring some really awesome insights from anyone else or the 
JodaTime forum, I'm thinking that (as much as i hate it) hand rolled date 
parsing/formatting code may be the way to go once and for all.

ugh.



> dates prior to 1000AD are not formatted properly in responses
> -
>
> Key: SOLR-1899
> URL: https://issues.apache.org/jira/browse/SOLR-1899
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 1.1.0, 1.2, 1.3, 1.4
>Reporter: Hoss Man
>Assignee: Hoss Man
> Attachments: SOLR-1899.patch
>
>
> As noted on the mailing list, if a document is added to solr with a date 
> field such as "0001-01-01T00:00:00Z" then when that document is returned by a 
> search the year will be improperly formated as "1-01-01T00:00:00Z"

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] Commented: (SOLR-1899) dates prior to 1000AD are not formatted properly in responses

2010-12-15 Thread Hoss Man (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12971835#action_12971835
 ] 

Hoss Man commented on SOLR-1899:


A question on the solr-user mailing list from Matthias Agethle also points out 
a problem with negative years -- this also seems to be because of the 
GregorianCalendar usage in those two classes when formatting dates (they aren't 
checking GregorianCalendar.ERA)

before resolving this issue, whatever fix is put in place should make sure that 
tests for negative years is included and if that problem is unrelated, a new 
bug should be filed.

> dates prior to 1000AD are not formatted properly in responses
> -
>
> Key: SOLR-1899
> URL: https://issues.apache.org/jira/browse/SOLR-1899
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 1.1.0, 1.2, 1.3, 1.4
>Reporter: Hoss Man
>
> As noted on the mailing list, if a document is added to solr with a date 
> field such as "0001-01-01T00:00:00Z" then when that document is returned by a 
> search the year will be improperly formated as "1-01-01T00:00:00Z"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] Commented: (SOLR-1899) dates prior to 1000AD are not formatted properly in responses

2010-04-30 Thread Hoss Man (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862960#action_12862960
 ] 

Hoss Man commented on SOLR-1899:


I believe the problem is in both XMLWriter.writeDate and JSONWriter.writeDate 
... those methods seem to be cut/psate and should also be refactored.

in general they should probably just be reusing something from DateField.



> dates prior to 1000AD are not formatted properly in responses
> -
>
> Key: SOLR-1899
> URL: https://issues.apache.org/jira/browse/SOLR-1899
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 1.1.0, 1.2, 1.3, 1.4
>Reporter: Hoss Man
>
> As noted on the mailing list, if a document is added to solr with a date 
> field such as "0001-01-01T00:00:00Z" then when that document is returned by a 
> search the year will be improperly formated as "1-01-01T00:00:00Z"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org