summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/olivere/elastic/search_aggs_bucket_date_range.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/olivere/elastic/search_aggs_bucket_date_range.go')
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_date_range.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_date_range.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_date_range.go
index 5407dadb8..714fd3e11 100644
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_date_range.go
+++ b/vendor/github.com/olivere/elastic/search_aggs_bucket_date_range.go
@@ -23,6 +23,7 @@ type DateRangeAggregation struct {
meta map[string]interface{}
keyed *bool
unmapped *bool
+ timeZone string
format string
entries []DateRangeAggregationEntry
}
@@ -71,6 +72,11 @@ func (a *DateRangeAggregation) Unmapped(unmapped bool) *DateRangeAggregation {
return a
}
+func (a *DateRangeAggregation) TimeZone(timeZone string) *DateRangeAggregation {
+ a.timeZone = timeZone
+ return a
+}
+
func (a *DateRangeAggregation) Format(format string) *DateRangeAggregation {
a.format = format
return a
@@ -178,6 +184,9 @@ func (a *DateRangeAggregation) Source() (interface{}, error) {
if a.unmapped != nil {
opts["unmapped"] = *a.unmapped
}
+ if a.timeZone != "" {
+ opts["time_zone"] = a.timeZone
+ }
if a.format != "" {
opts["format"] = a.format
}