Kibana Time filter time filter

In Kibana 6.3 the absolute value is not getting correctly for the selections

{from: "now/d", to: "now/d", display: "Today", section: 0, $$hashKey: "object:223"},
{from: "now/w", to: "now/w", display: "This week", section: 0, $$hashKey: "object:224"}

For example if the Today is selected in Quick selection in the Kibana then the Absolute is showing as "From:2018-07-30 00:00:00.000 To:2018-07-30 23:59:59.999" But the timefilter.time.from and timefilter.time.to shows 2018-07-30 00:00:00.000. It is hapening for the quick ranges which has future date and times.

is there any issues with kibana 6.3 ?

Hey @logesh_j, are you using the timefilter.time.from and timefilter.time.to from within the context of a custom visualization or app that you're writing?

Custom visualization. It works well with Today so far , Week to date etc. it is not working for the future to dates.

So your concern is that the "week to date" quick time-range is using the current time of the day, whereas "today" is for the entire day (including the rest of the day)?

my concern is the quick select and absolute are not matching in the api timefilter.time.from,timefilter.time.to for Today,This week or quick select options which has future dates.

So if you select "Today" from the quick selection, and then look at the absolute tab, you'll see "2018-07-30 00:00:00.000" to "2018-07-30 23:59:59.999", and we're translating this into the following query (which matches those dates for my browser's timezone) which is sent to Elasticsearch:

         {
          "range": {
            "@timestamp": {
              "gte": 1532923200000,
              "lte": 1533009599999,
              "format": "epoch_millis"
            }
          }
        }

whereas if I select "Week to Date" from the quick selection, then I look at the absolute tab, I see "2018-07-29 00:00:00.000" to "2018-07-30 15:18:43.181", and we're translating this to the following Elasticsearch query:

        {
          "range": {
            "@timestamp": {
              "gte": 1532836800000,
              "lte": 1532978323349,
              "format": "epoch_millis"
            }
          }
        }

So "Today" is including everything for today, including future events. Whereas "Week to Date" is up until this time of the day.

Which API are you looking at that you aren't seeing this match?

I would expect the same absolute value in the vis.API.timeFilter which is not happening.

@logesh_j, if I use vis.API.timeFilter.getBounds() in 6.3 within a visualization, I'm seeing the same behavior as what I've denoted above.

Can you share the exact code that you're having problems with?

Interesting. Let me share the code..

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