Date field display issue in Kibana


(Ashish Barnwal) #1

Dear All,

2 hours is getting added automatically in a date field ( yyyy-MM-dd HH:mm:ss) value while displaying the data in Kibana. However JSON value for that entry is displayed correctly in Kibana.

For e.g., data pushed to Elastic search : 2017-08-02 02:04:02
Data shown in Kibana search: 2017-08-02 04:04:02

I have also changed the date format timezone (dateFormat:tz) in advance settings but result is still the same.
Can you please suggest how these two can be in sync.

Thanks,
Ashish


(Lukas Olson) #2

If you go to Dev Tools, Console and manually make a request for the data in Elasticsearch, you see the first value, correct?


(Ashish Barnwal) #3

Yes thats correct.


(Lukas Olson) #4

Which time zone are you selecting for the dateFormat:tz, what is your browser timezone, and what is the timezone of the server running elasticsearch?


(Ashish Barnwal) #5

For dateFormat:tz, I have selected Europe/Amsterdam as timezone. I believe browser timezone will be same as the timezone of the machine where its hosted. Timezone of that machine is also CET (amsterdam). Elastic search is hosted on the same machine.


(Lukas Olson) #6

My guess is that, since you're not sending the time zone in the date you send to Elasticsearch, then it's assumed that the dates are in UTC time. Then, when you view the dates in Kibana, it is translating them into your local time. If you'd like them to be in sync, I'd suggest including the time zone in the dates you're sending to Elasticsearch.


(Ashish Barnwal) #7

Thanks. Yes you are right! I have now changed the format of my date field to custom format yyyy-MM-dd'T'HH:mm:ssz to support timezone however its not able to recognize CET, IST, EET etc... it only recognizes few like UTC, PST etc...
Do you know by any chance what is the format supported for Europe/Amsterdam.


(Lukas Olson) #8

You could use an offset instead of the zone name, such as +0200 instead. Could you give that a try?


(system) #9

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