Solr
  1. Solr
  2. SOLR-701

DateField implicitly uses default locale to format milliseconds

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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
        Stefan Oestreicher added a comment -

        clarify subject and description

        Show
        Stefan Oestreicher added a comment - clarify subject and description
        Hide
        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
        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development