Time in a field of type date

Good day :slightly_smiling_face:
Please tell me how to set up the field correctly so that the time in it does not differ from the incoming data?

PUT service100
{
  "mappings": {
    "properties": {
      "DELIVERY_TIME": {
        "type": "date",
        "format": "dd/MM/yyyy HH:mm:ss"
      }
      }
  }
}
GET service100/_mapping
PUT service100/_doc/123
{
  "DELIVERY_TIME": "26/05/2020 11:59:58"
}
GET service100/_doc/123

In kibana, I get 3 hours more time in the field.
(I suspect it's my time zone ... +3 hours)

I changed the "Timezone for date formatting" parameter in Advanced Settings Kibana from "Browser" to Етс / GMT + 0, but then I get the wrong time (minus three hours) in the @timestamp field, when I import data into the index...

Thanks in advance everyone for the answer!

When Elasticsearch receives a timestamp, it assumes that it is in UTC.
When you see the document in Kibana's Discover, it's converting that from what Elasticsearch sends it, which again is considered to be UTC, and then converts that into the timezone of the browser.

TLDR, if the timestamp you are not inputting into Elasticsearch is actually in UTC, you will want to adjust it accordingly, and/or change your format to include a timezone so that Elasticsearch can adjust it for you.

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