Date/Timestamp showing wrong in Discover

New to Elasticsearch and trying to learn how things work. When I input the following in Dev Tools

PUT /ptest-1/_doc/1
{
"timestamp": "2020-12-16T10:53:01.358062",
"computer_name": "HP-8740W",
"UserName": "Eric",
"ActiveWindows": "Test Window"
}

I show this when I look at the index in Discover

ActiveWindows Test Window	
UserName Eric	
_id 1	
_index ptest-1
_score - 	
_type
_doc	
computer_name HP-8740W	
timestamp Dec 16, 2020 @ 04:53:01.358

Why does the date show 04:53:01.358 when it was input at 10:53:01.358062 do I need to format the date different?

Hi Eric,
AFAIK this is normal.
Timestamp in elasticsearch (when you PUT your data) is treated as UTC by default.
My guess is that you are somewhere between Winnipeg and Mexico city ? :wink:
-> Kibana, on its sides, uses your browser's timezone to display date/times
Tip: use a formatter on the date mapping, and send timestamp dates with an offset like:

"timestamp": "2020-12-16T10:53:01.358062-06",

you might have to adjust the mapping in order to properly index such values.

1 Like

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