# Inconsistencies in query vs display in Discover

**URL:** <https://discuss.elastic.co/t/inconsistencies-in-query-vs-display-in-discover/181468>\
**Category:** Kibana\
**Created:** [May 16, 2019, 6:41pm UTC](https://discuss.elastic.co/t/inconsistencies-in-query-vs-display-in-discover/181468 "2019-05-16T18:41:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mconner](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@mconner](https://discuss.elastic.co/u/mconner)\
**Post date:** [May 16, 2019, 6:41pm UTC](https://discuss.elastic.co/t/inconsistencies-in-query-vs-display-in-discover/181468/1 "2019-05-16T18:41:40Z")

</div>

I'm using kibana 6.6.0 and have stored a doc with study date as:  
...  
`"studyDate_datetime": "2011-05-30T21:11:15.000Z"`  
...

When I query for this in Discover as: `studyDate_datetime: 2011-05-30`  
It matches, and displays as `May 30th 2011, 16:11:15.000`.

However, it does **not** match `studyDate_datetime: 2011-05-30T16`.  
Apparently, while kibana _displays_ dates according to the browser timezone, it does not _query_ according to the browser timezone (when it is not specified), but instead uses UTC. This seems inconsistent. **Is there some way to change this?**

I've found that I can explicitly define the offset in the query, and this works properly:  
`studyDate_datetime: 2011-05-30T16-0500`

Related to this, I modified the Date Format to be `MMMM Do YYYY, HH:mm:ss.SSSZZ`, so at least it is clear what offset is being displayed, but that's somewhat clunky, and has an unfortunate result, since this format is apparently also used to display filters: I enter a filter value of `2011-05-30T21`. Consistent with the query behavior, it filters on 2011-05-30T21Z, and returns a result. But it _displays the filter_ as `studyDate_datetime: May 30th 2011, 21:00:00.000-0500`:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/0/f0a735bbd1bb8003bc02e99aef5dbc512755c8a1.png)  
This seems like a bug. It is actually filtering on ... 21Z, not 21-0500. Again, at least if you specify the offset explicitly, it works correctly. (Also, the inclusion of the minute, second, and millisecond in the filter message is inaccurate, since it is only filtering to the hour level.)

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [May 16, 2019, 7:47pm UTC](https://discuss.elastic.co/t/inconsistencies-in-query-vs-display-in-discover/181468/2 "2019-05-16T19:47:07Z")

</div>

hi @mconner

you can change the default time-zone setting in `dateFormat:tz` advanced setting of Kibana. [https://www.elastic.co/guide/en/kibana/current/advanced-options.html](https://www.elastic.co/guide/en/kibana/current/advanced-options.html)

The default is indeed the browser's timezone.

---

<div class="post-metadata">

**Author:** ![mconner](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@mconner](https://discuss.elastic.co/u/mconner)\
**Post date:** [May 16, 2019, 8:15pm UTC](https://discuss.elastic.co/t/inconsistencies-in-query-vs-display-in-discover/181468/3 "2019-05-16T20:15:18Z")

</div>

@thomasneirynck, I understand that I can change the timezone used for display, but that's not what I'm asking. I want to know if there's some way to get Kibana to use _whatever_ time zone is set (e.g. the browser) when it _performs_ queries if I don't explicitly specify one by appending an offset (e.g.: "-0500"). Otherwise, it is inconsistent between what it requests and what it displays (unless I set `dateFormat:tz`to UTC). More concisely: queries should default to `dateFormat:tz`instead of UTC.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 13, 2019, 8:15pm UTC](https://discuss.elastic.co/t/inconsistencies-in-query-vs-display-in-discover/181468/4 "2019-06-13T20:15:19Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
