Skip to content

Conversation

@cbuescher
Copy link
Member

Currently rounding in DateMathParser is always done in UTC, even
when another time zone is specified. This is fixed by passing the time zone
down to the rounding logic when it is specified.

Closes #9814

Christoph Büscher added 2 commits February 25, 2015 12:54
Currently rounding in DateMathParser is always done in UTC, even
when another time zone is specified. This fix corrects this by
passing the specified time zone down to the rounding logic.

Closes  elastic#9814
@rjernst
Copy link
Member

rjernst commented Feb 25, 2015

LGTM

@cbuescher cbuescher closed this in b16fb69 Feb 25, 2015
cbuescher pushed a commit that referenced this pull request Feb 25, 2015
Currently rounding in DateMathParser This always done in UTC, even
when another time zone is specified. This is fixed by passing the time zone
down to the rounding logic when it is specified.

Closes #9814
Closes #9885
@cbuescher
Copy link
Member Author

On 1.x with 8391b51.

@rjernst I ran into a bit of a mess trying to backport the tests in DateMathParserTests for this PR to the 1.4 branch. The diff between the two branches is quiet big for that test class, so adding just the new lines for this fix is difficult. I tried backporting the the whole test class form 1.x to 1.4, but in that case I had to change a lot of the actual tests to the current behaviour of DateMath on 1.4.
Any suggestions how to procede here? Keep the orginal DateMathParserTests from 1.4 and only try to add the new tests there or try to update the whole thing according to the current state of tests in 1.x?

@rjernst
Copy link
Member

rjernst commented Feb 25, 2015

If the backport is too complicated, we should not do it. I don't think this is critical enough that it must be in a bugfix release.

@cbuescher
Copy link
Member Author

@rjernst The backport is not difficult, would be nice to have on 1.4. Just the test class changed a lot from 1.4 to 1.x, so the tests will have to be adapted and be slightly different from this PR. Would you mind having another look if I push to my repo before merging?

@rjernst
Copy link
Member

rjernst commented Feb 27, 2015

@cbuescher Sure, let me know where to look.

@cbuescher
Copy link
Member Author

I pushed the changes agains 1.4 branch to cbuescher@997b8ce. Basically it's the same fix as in 1.x, I only backportet the rounding tests and had to adapt them to the "old" rounding logic on 1.4. (I think you changed the edge inclusions on the 1.x branch)

@rjernst
Copy link
Member

rjernst commented Feb 27, 2015

@cbuescher +1 to the backport

cbuescher pushed a commit that referenced this pull request Mar 2, 2015
Currently rounding in DateMathParser This always done in UTC, even
when another time zone is specified. This is fixed by passing the time zone
down to the rounding logic when it is specified.

Closes #9814
Closes #9885
@cbuescher
Copy link
Member Author

Great, pushed to 1.4 branch with dff19cb

mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
Currently rounding in DateMathParser This always done in UTC, even
when another time zone is specified. This is fixed by passing the time zone
down to the rounding logic when it is specified.

Closes elastic#9814
Closes elastic#9885
@cbuescher cbuescher deleted the fix/9814 branch March 31, 2016 09:27
@clintongormley clintongormley added :Search Foundations/Mapping Index mappings, including merging and defining field types and removed :Dates labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Search Foundations/Mapping Index mappings, including merging and defining field types v1.4.5 v1.5.0 v2.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Range filters, date math and time_zone

3 participants