Hi, I'm running Elasticsearch 2.3.1 CentOS release 6.7 (Final). I'm here use +8 time zone .
question:
Why save when using local time zone (+ 8), query according to time format string data is 0 time zone, but also automatically compensate time difference (query range cheap eight hours)
last is query and result.
thanks man!
-
query
{
"query": {
"bool": {
"must": [
{
"range": {
"starttime": {
"gt": "2015-12-01 00:00:00",
"lt": "2015-12-01 03:59:59"
}
}
}
],
"must_not": ,
"should":
}
},
"from": 0,
"size": 10,
"sort": ,
"aggs": { }
} -
result
1448940867000
1448942308000
1448931935000
1448941252000
1448939838000
1448935642000 -
question
{
"query": {
"bool": {
"must": [
{
"range": {
"starttime": {
"gt": "2015-12-01 00:00:00",
"lt": "2015-12-01 03:59:59",
"time_zone": "+08:00"
}
}
}
],
"must_not": ,
"should":
}
},
"from": 0,
"size": 10,
"sort": ,
"aggs": {}
}
2.result {
"took": 3,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 5,
....(sorry result data is long long long )
1448910912000
1448911531000
1448906069000
1448902504000
1448911803000