Date_histogram offset results in wrong date [6.2]

No one answered this topic, but I am experiencing the same problem. Is there an explanation or solution for this?

{
"size": 0,
"query": {
    "range": {
        "@timestamp": {
            "gte": "now/d",
            "lte": "now/d+1d",
            "time_zone": "+02:00"
        }
    }
},
"aggs": {
    "chartdata": {
        "date_histogram": {
            "field": "@timestamp",
            "interval": "day",
            "time_zone": "+02:00",
            "offset": "+6h"
        },....

The result is: "key_as_string": "2019-06-24T06:00:00.000+02:00",
Expected result: "key_as_string": "2019-06-25T06:00:00.000+02:00",

I know understood why ES has this behaviour. I added a must_not filter to exclude the data before the offset.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.