# Time Filter not working in kibana 7.4

**URL:** <https://discuss.elastic.co/t/time-filter-not-working-in-kibana-7-4/205119>\
**Category:** Kibana\
**Created:** [October 24, 2019, 4:29pm UTC](https://discuss.elastic.co/t/time-filter-not-working-in-kibana-7-4/205119 "2019-10-24T16:29:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dome](https://avatars.discourse-cdn.com/v4/letter/d/85f322/32.png) [@dome](https://discuss.elastic.co/u/dome)\
**Post date:** [October 24, 2019, 4:29pm UTC](https://discuss.elastic.co/t/time-filter-not-working-in-kibana-7-4/205119/1 "2019-10-24T16:29:30Z")

</div>

Hi everyone,  
I started studying the operation of Kibana (7.4) now and I have a problem that has not been answered in the many discussions on the subject.

The current time in the filter is 2 hours back.

![img1](https://us1.discourse-cdn.com/elastic/original/3X/4/7/47fe1ef330b8a4025c694692fed21ceb6df7d99e.jpeg)

I'm running Kibana on my machine and I changed the "tz" setting with UTC, I tried to set my time zone but nothing.

 ![img2](https://us1.discourse-cdn.com/elastic/original/3X/c/6/c6864dda84cfef6839cd18c40788bc8e9e90ba4b.jpeg)

The change from "default" to "UTC" solved the problem of the timestamp in the data that were displayed with 2 more hours.

Has anyone solved it?

Thanks

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [October 24, 2019, 9:20pm UTC](https://discuss.elastic.co/t/time-filter-not-working-in-kibana-7-4/205119/2 "2019-10-24T21:20:55Z")

</div>

Hey @dome, I'd recommend changing `dateFormat:tz` back to `Browser`, this will use your current timezone when displaying dates and times.

It sounds like you might've changed that setting because the data that you ingested into Elasticsearch isn't stored in such a way that the time filter field is behaving properly. If you check the raw Elasticsearch documents themselves using Dev Tools, you'll see the dates unformatted. You'll want to ensure these dates are correct and have the proper timezone offset.

---

<div class="post-metadata">

**Author:** ![dome](https://avatars.discourse-cdn.com/v4/letter/d/85f322/32.png) [@dome](https://discuss.elastic.co/u/dome)\
**Post date:** [October 25, 2019, 6:56am UTC](https://discuss.elastic.co/t/time-filter-not-working-in-kibana-7-4/205119/3 "2019-10-25T06:56:14Z")

</div>

Hello @ [Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel),  
first of all thanks for the prompt reply.  
As you advised me I put "Browser" back but the problem of the dates remains, and the one on the entered data is added. Even if I don't set a time (only date) I will set the date with the time "01:00:00.000".

The browser time should be that of the PC.

This is the date and timestamp format I insert (with a simple PUT in Dev Tools).

![img1](https://us1.discourse-cdn.com/elastic/original/3X/d/b/db553db21278c5faf0b039436ad878b897b144f8.jpeg)

I also tried to delete the timestamp field and just enter the date but the problem is the same.

Where am I wrong?  
Thanks

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [October 25, 2019, 3:16pm UTC](https://discuss.elastic.co/t/time-filter-not-working-in-kibana-7-4/205119/4 "2019-10-25T15:16:21Z")

</div>

Hey @dome, the date `2019-10-22T11:00:00.000` doesn't have any timezone information, Elasticsearch is returning the date in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) formatting. When inserting the ES documents with dates, if you use `2019-10-22T11:00:00.000Z` the `Z` at the end denotes that the date is in UTC. You can also include the time-zone offset from UTC, for example `2019-10-22T11:00:00.000+03:00`. Without this timezone information in Elasticsearch, the local timezone is used by Elasticsearch, and then Kibana is unable to accurately apply it's own offsets.

---

<div class="post-metadata">

**Author:** ![dome](https://avatars.discourse-cdn.com/v4/letter/d/85f322/32.png) [@dome](https://discuss.elastic.co/u/dome)\
**Post date:** [October 29, 2019, 10:06am UTC](https://discuss.elastic.co/t/time-filter-not-working-in-kibana-7-4/205119/5 "2019-10-29T10:06:20Z")

</div>

Hi @Brandon_Kobel ,  
I did as you told me adding +02: 00 to the date, but in any case the filter date is one hour back.

Is this the only way to deal with dates and timestamps?

Thanks

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [October 29, 2019, 4:36pm UTC](https://discuss.elastic.co/t/time-filter-not-working-in-kibana-7-4/205119/6 "2019-10-29T16:36:05Z")

</div>

@dome which version of Kibana/Elasticsearch are you using? I'm currently in the PST timezone with a minus seven hours offset. Using DevTools, I'm able to insert two documents, one using my current timezone offset and one using UTC:

```auto
POST dome/_doc
{
  "message": "hello",
  "@timestamp": "2019-10-29T09:22:00.000-0700"
}

POST dome/_doc
{
  "message": "hello",
  "@timestamp": "2019-10-29T16:22:00.000Z"
}

```

And then when I view these documents within Discover, I see both being treated properly by the date-filter and displayed correctly:

 ![45%20AM](https://us1.discourse-cdn.com/elastic/original/3X/f/5/f53f9809143fe2668e861918fd0ab95b7e8635e6.png)

---

<div class="post-metadata">

**Author:** ![dome](https://avatars.discourse-cdn.com/v4/letter/d/85f322/32.png) [@dome](https://discuss.elastic.co/u/dome)\
**Post date:** [October 30, 2019, 8:49am UTC](https://discuss.elastic.co/t/time-filter-not-working-in-kibana-7-4/205119/7 "2019-10-30T08:49:52Z")

</div>

Hey @Brandon_Kobel,  
the elasticsearch version is 7.4 and the kibana version is 7.4, however I solved the mystery.

The format was correct, the problem that in the request the date of the filter is not correctly displayed and this sent me in confusion.

 ![img1](https://us1.discourse-cdn.com/elastic/original/3X/b/a/bae9ea6839972850432599e0a5b354d65c21e1ad.jpeg)

![img2](https://us1.discourse-cdn.com/elastic/original/3X/a/c/ac59622342db6bbdc198de2d6e5f7c50517c61f1.jpeg)

Thanks

---

<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:** [November 27, 2019, 8:50am UTC](https://discuss.elastic.co/t/time-filter-not-working-in-kibana-7-4/205119/8 "2019-11-27T08:50:04Z")

</div>

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