in elastic/shared/query_handlers/date_histogram.py [0:0]
def process(self, date_data):
if self.max_bound and self.min_bound:
new_min, new_max = date_data.generate_new_bounds(self.min_bound, self.max_bound)
self.extended_bounds["max"] = int(new_max.timestamp() * 1000)
self.extended_bounds["min"] = int(new_min.timestamp() * 1000)
# interval customizations are provided on best-effort basis; only if generate_new_bounds was invoked previously
if "calendar_interval" in self.request_body and date_data.calendar_interval:
self.request_body["calendar_interval"] = date_data.calendar_interval
if "fixed_interval" in self.request_body and date_data.fixed_interval:
self.request_body["fixed_interval"] = date_data.fixed_interval