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

DIH DateFormatEvaluator seems to have problems with DST changes -> test disabled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0, 4.1
    • 4.2, 6.0
    • None

    Description

      Yesterday was DST change in Fidji (clock went one hour backwards, as summer time ended and winter time started). This caused org.apache.solr.handler.dataimport.TestBuiltInEvaluators.testDateFormatEvaluator to fail. The reason is simple: NOW-2DAYS is evaluated without taking time zone into account (its substracting 48 hours), but to be correct and go 2 DAYS back in local wall clock time, it must subtract only 47 hours. If this is not intended (we want to go 48 hours back, not 47), the test needs a fix. Otherwise the date evaluator must take the timezone into account when substracting days (e.g., use correctly localized Calendar instance and use the add() method (http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html#add(int, int)).

      Attachments

        1. SOLR-4325.patch
          5 kB
          James Dyer

        Activity

          People

            jdyer James Dyer
            uschindler Uwe Schindler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: