Document Date changes after being indexed into Elasticsearch

, I have a database and an Elasticsearch setup. Documents are written to the database first
and are then indexed into ES. I noticed that the date field in ES is different from that in
the database.

The date field in ES is incorrect because the documents are dated in the future e.g. 2020 or Dec 2019.

The date field mapping has a date type and epoch format.

The Elasticsearch setup is running on Windows 2016 and the database runs on Windows 2012.

What are the possible causes of this difference?

Can you share a document which is wrong and the mapping?

The mapping for the date field is:

 "properties": {
 "DOCUMENTDATE_N_S": {
      "type": "date",
      "format": "epoch_second"
    },
  ...
 }

For the document, an example would be the correct date is 13/12/2018 but when searching for the document in kibana, the DOCUMENTDATE_N_S field will be 1591027200 which translates to 02 June 2020.

I have made sure that the DB and Elasticsearch servers are both in the same region (United States). The DB is on Windows 2012 while the ES server is on Windows 2016.

What could be the problem causing the date change?

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