import java.util.Map;
import java.util.Set;
import java.util.SortedSet;
+import java.util.TimeZone;
import java.util.regex.Pattern;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
LANGUAGES,
TAGS,
TYPES,
- CREATED_AT
- );
-
+ CREATED_AT);
// TODO to be documented
// TODO move to Facets ?
long now = system.now();
String timeZoneString = system.getDefaultTimeZone().getID();
+ String gmtTimeZoneString = TimeZone.getTimeZone("GMT").getID();
DateHistogram.Interval bucketSize = DateHistogram.Interval.YEAR;
Date createdAfter = query.createdAfter();
.interval(bucketSize)
.minDocCount(0L)
.format(DateUtils.DATETIME_FORMAT)
- .timeZone(timeZoneString)
+ .timeZone(gmtTimeZoneString)
.postZone(timeZoneString)
.extendedBounds(startTime, endTime);
dateHistogram = addEffortAggregationIfNeeded(query, dateHistogram);