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

Date Math should allow clients to override timezone used for rounding (faceting & queries)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0-ALPHA
    • None
    • None

    Description

      Timezone needs to be taken into account when doing date math. Currently it isn't. DateMathParser instances created are always being constructed with UTC. This is a huge issue when it comes to faceting. Depending on your timezone day-light-savings changes the length of a month. A facet gap of +1MONTH is different depending on the timezone and the time of the year.

      I believe the issue is very simple to fix. There are three places in the code DateMathParser is created. All three are configured with the timezone being UTC. If a user could specify the TimeZone to pass into DateMathParser this faceting issue would be resolved.

      Attachments

        1. add-tz-parameter.patch
          10 kB
          David Schlotfeldt
        2. add-tz-parameter.patch
          10 kB
          David Schlotfeldt
        3. SOLR-2690.patch
          25 kB
          Chris M. Hostetter
        4. SOLR-2690.patch
          16 kB
          Chris M. Hostetter
        5. SOLR-2690.patch
          7 kB
          Chris M. Hostetter
        6. timezone-facet-component.tgz
          13 kB
          Shotaro Kamio

        Issue Links

          Activity

            People

              hossman Chris M. Hostetter
              dmschlot David Schlotfeldt
              Votes:
              3 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 3h
                  3h
                  Remaining:
                  Remaining Estimate - 3h
                  3h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified