Datehistogram on DayLightSaving time range produces wrong buckets

Time Zone: America/Los_Angeles
Search Start Time - 10/03/2024 00:00
Search End Time - 10/03/2024 04:00
Note - On DST clock forwards one hour, after 10/03/2024 1:59 we will have 10/03/2024 3:00.
Date histogram interval: 41(minutes)

Shared the needed data to reproduce the issue.

Search Query,

curl -X POST "localhost:9200/test/_search?size=0&pretty" -H 'Content-Type: application/json' -d'
    {
	  "explain": false,
	  "size": 0,
	  "query": {
	    "bool": {
	      "adjust_pure_negative": true,
	      "must": [
		{
		  "range": {
		    "messagetime": {
		      "include_lower": true,
		      "include_upper": true,
		      "from": 1710061200000,
		      "to": 1710068400000
		    }
		  }
		}
	      ]
	    }
	  },
	  "from": 0,
	  "aggregations": {
	    "timeslice|timehisto": {
	      "date_histogram": {
		"field": "messagetime",
		"offset": 660000,
		"fixed_interval": "43m",
		"time_zone": "America/Los_Angeles",
		"keyed": false,
		"min_doc_count": 0,
		"order": {
		  "_key": "asc"
		},
		"extended_bounds": {
		  "min": 1710061200000,
		  "max": 1710068400000
		}
	      }
	    }
	  },
	  "track_total_hits": true
    }'
    

Actual Problem

Date histogram interval : 43 minutes (typing mistake before it was 41 minutes)
Sorry for the inconvenience

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