-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Search Foundations/MappingIndex mappings, including merging and defining field typesIndex mappings, including merging and defining field types>bugTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearchv1.4.5v1.5.0v2.0.0-beta1
Description
Hi guys.
I've stumbled upon an issue. When specifying the time_zone parameters in a range filter where gte and lt are set using datemath, the time zone is not taken into account when rounding!
The following is part of a filters aggregation, and I expect to be given the week 4 weeks ago, starting on a
sunday at 23:00 UTC time, and ending on sunday 23:00 UTC time with a full week in between.
{
"filters": {
"4w": {
"range": {
"timestamp": {
"lt": "now-4w+1w/w",
"gte": "now-4w/w",
"time_zone": "+01:00"
}
}
}
}
}
But no, after inspecting the docs that are returned, there are no documents returned between the first sunday 23:00 and monday 00:00 UTC. There are however documents returned between sunday 23:00 and monday 00:00 UTC at the end of the interval.
Is this a bug? Should not timezones be included when doing rounding in date math?
Metadata
Metadata
Assignees
Labels
:Search Foundations/MappingIndex mappings, including merging and defining field typesIndex mappings, including merging and defining field types>bugTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearchv1.4.5v1.5.0v2.0.0-beta1