mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
Previously, the timezone parameter was not passed to the RangeQuery and as a results queries that use the ES date math notation (now, now-1d, now/d, now/h, now+2h, etc.) were using the UTC timezone and not the one passed through the "timezone"/"time_zone" JDBC/REST params. As a consequence, the date math defined dates were always considered in UTC and possibly led to incorrect results for queries like: ``` SELECT * FROM t WHERE date BETWEEN now-1d/d AND now/d ``` Fixes: #56049 (cherry picked from commit 300f010c0b18ed0f10a41d5e1606466ba0a3088f)