Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-701

DateField implicitly uses default locale to format milliseconds

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: None
    • Labels:
      None

      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.

        Activity

        Hide
        hossman Hoss Man added a comment -

        Note: this bug was introduced in SOLR-470.

        Commited patch along with some refactoring to make it clear why UTC and Locale.US are used for the two very different reasons they are used in this class.

        Committed revision 686159.

        thanks Stefan.

        Show
        hossman Hoss Man added a comment - Note: this bug was introduced in SOLR-470 . Commited patch along with some refactoring to make it clear why UTC and Locale.US are used for the two very different reasons they are used in this class. Committed revision 686159. thanks Stefan.
        Hide
        dlx Stefan Oestreicher added a comment -

        clarify subject and description

        Show
        dlx Stefan Oestreicher added a comment - clarify subject and description

          People

          • Assignee:
            hossman Hoss Man
            Reporter:
            dlx Stefan Oestreicher
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development