Setting TimeZone to Elasticsearch on Docker


I am using Elasticsearch and Kibana on Docker machines provided by version 5.2.2. All works fine but I CANNOT set the timestamp for the docker machine where the Elasticsearch is running, but Kibana is fine.

For example the code below (not is complete line code) sets correctly the TimeZone for Kiban:

docker run -e TZ=America/Sao_Paulo

But the code below doesn't set the timezone for Elasticsearch:

docker run -e TZ=America/Sao_Paulo

This is causing to me a time differenct of three hours. I figured out the Elastiscsearch's Docker machine does not have the folder /usr/share/zoneinfo for setting the proper timezone.

My questions are:

  • Is it possible install the package TZDATA for solve this?
  • Or, I have to use both Elastic and Kibana docker machine on GMT+0 (default) . In this case, I'll have issue problems? I am asking that because I am saving the date "YYYY-MM-DD'T'HH:MM;SS".

Thank you in advanced.

1 Like

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