You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Stefan Oestreicher (JIRA)" <ji...@apache.org> on 2008/08/15 00:41:44 UTC

[jira] Updated: (SOLR-701) DateField implicitly uses default locale to format milliseconds

     [ https://issues.apache.org/jira/browse/SOLR-701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Oestreicher updated SOLR-701:
------------------------------------

          Description: 
The ISO8601CanonicalDateFormat class which is defined inside the DateField class doesn't specify the US locale when creating the formatter used for milliseconds. Because of that the following unit tests fail when run with another locale than english:
org.apache.solr.schema.LegacyDateFieldTest
org.apache.solr.schema.DateFieldTest

The attached patch resolves this issue.

  was:
The following unit tests fail if they're run with a locale using "," as decimal separator (e.g. german):

org.apache.solr.schema.LegacyDateFieldTest
org.apache.solr.schema.DateFieldTest
org.apache.solr.handler.dataimport.TestNumberFormatTransformer

The DateField tests fail because the expected decimal format uses "." as separator but the actual result is formatted using the "," separator.
This happens because the ISO8601CanonicalDateFormat class which is defined inside the DateField class doesn't specify the US locale when creating the formatter used for milliseconds.
Patch: schema.DateField-locale.patch.txt

see SOLR-700 for a resolution to the TestNumberFormatTransformer failure.

    Affects Version/s:     (was: 1.3)
              Summary: DateField implicitly uses default locale to format milliseconds  (was: test failures because system locale is used)

clarify subject and description

> DateField implicitly uses default locale to format milliseconds
> ---------------------------------------------------------------
>
>                 Key: SOLR-701
>                 URL: https://issues.apache.org/jira/browse/SOLR-701
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Stefan Oestreicher
>            Priority: Minor
>         Attachments: schema.DateField-locale.patch.txt
>
>
> The ISO8601CanonicalDateFormat class which is defined inside the DateField class doesn't specify the US locale when creating the formatter used for milliseconds. Because of that the following unit tests fail when run with another locale than english:
> org.apache.solr.schema.LegacyDateFieldTest
> org.apache.solr.schema.DateFieldTest
> The attached patch resolves this issue.

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