Time Filter not working in kibana 7.4

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

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

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

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.

Hello @ 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

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

Where am I wrong?
Thanks

Hey @dome, the date 2019-10-22T11:00:00.000 doesn't have any timezone information, Elasticsearch is returning the date in 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.

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

@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:

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:

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.

img2

Thanks

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