# Changing Time Zone for Elastic

**URL:** <https://discuss.elastic.co/t/changing-time-zone-for-elastic/352761>\
**Category:** Elasticsearch\
**Created:** [February 7, 2024, 1:03pm UTC](https://discuss.elastic.co/t/changing-time-zone-for-elastic/352761 "2024-02-07T13:03:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruslan.yeraliyev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruslan.yeraliyev/32/131520_2.png) [@ruslan.yeraliyev](https://discuss.elastic.co/u/ruslan.yeraliyev)\
**Post date:** [February 7, 2024, 1:03pm UTC](https://discuss.elastic.co/t/changing-time-zone-for-elastic/352761/1 "2024-02-07T13:03:22Z")

</div>

Hi, All. Who knows how Kafka will behave when changing time zones? We are soon switching from UTC +6 to UTC +5. Will simply changing the settings in NTP or Chrony resolve this issue? Perhaps someone has practical experience dealing with this?

---

<div class="post-metadata">

**Author:** ![ruslan.yeraliyev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruslan.yeraliyev/32/131520_2.png) [@ruslan.yeraliyev](https://discuss.elastic.co/u/ruslan.yeraliyev)\
**Post date:** [February 20, 2024, 5:00pm UTC](https://discuss.elastic.co/t/changing-time-zone-for-elastic/352761/2 "2024-02-20T17:00:25Z")

</div>

Hi, guys. Please check

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 20, 2024, 5:20pm UTC](https://discuss.elastic.co/t/changing-time-zone-for-elastic/352761/3 "2024-02-20T17:20:18Z")

</div>

Hello,

I'm not seem how this is related to any Elastic tool.

Kafka is not an Elastic tool, it is not clear what is your issue here.

---

<div class="post-metadata">

**Author:** ![ruslan.yeraliyev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruslan.yeraliyev/32/131520_2.png) [@ruslan.yeraliyev](https://discuss.elastic.co/u/ruslan.yeraliyev)\
**Post date:** [February 20, 2024, 5:28pm UTC](https://discuss.elastic.co/t/changing-time-zone-for-elastic/352761/4 "2024-02-20T17:28:01Z")

</div>

a sorry. Not Kafka. For Elasticsearch sure

---

<div class="post-metadata">

**Author:** ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)\
**Post date:** [February 20, 2024, 5:44pm UTC](https://discuss.elastic.co/t/changing-time-zone-for-elastic/352761/5 "2024-02-20T17:44:39Z")

</div>

UTC stay the same. Everything stored in ES is in UTC time. Kibana present data depend on the browser's timezone.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 20, 2024, 5:51pm UTC](https://discuss.elastic.co/t/changing-time-zone-for-elastic/352761/6 "2024-02-20T17:51:40Z")

</div>

> [@ruslan.yeraliyev](#):
>
> a sorry. Not Kafka. For Elasticsearch sure

So, what is the issue? Because it is not clear which tool you are talking and what you will change.

The server will change? Your applications changing logs will change?

Elasticsearch uses UTC for every date type, so the timezone where it is running doesn't matter.

For example, if your server was running on UTC+6 and now is running on UTC+5, this has no impact in Elasticsearch because all the dates are stored in UTC.

---

<div class="post-metadata">

**Author:** ![ruslan.yeraliyev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruslan.yeraliyev/32/131520_2.png) [@ruslan.yeraliyev](https://discuss.elastic.co/u/ruslan.yeraliyev)\
**Post date:** [February 22, 2024, 4:54am UTC](https://discuss.elastic.co/t/changing-time-zone-for-elastic/352761/7 "2024-02-22T04:54:57Z")

</div>

Hi, @leandrojmp. When changing the time zone to utc +5 in the host machine, the time zone of the elastic material did not change, although at this stage the date had changed.  
For example, the admins changed the time zone yesterday (March 1 00:00, utc+5), but in the elastic logs we see (March 1 01:00)

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 22, 2024, 12:24pm UTC](https://discuss.elastic.co/t/changing-time-zone-for-elastic/352761/8 "2024-02-22T12:24:18Z")

</div>

> [@ruslan.yeraliyev](#):
>
> When changing the time zone to utc +5 in the host machine, the time zone of the elastic material did not change, although at this stage the date had changed.

Yes, this is expected, as mentioned Elasticsearch uses UTC, the timezone where the server is running does not have any impact.

> [@ruslan.yeraliyev](#):
>
> For example, the admins changed the time zone yesterday (March 1 00:00, utc+5), but in the elastic logs we see (March 1 01:00)

You mean the logs created by the Elasticsearch service or the logs indexed in Elasticsearch, those are two different things?

For the logs of the service it should change, but I'm not sure if a restart is required, I would assume that it is.

For the logs indexed in Elasticsearch, the date time fields will be converted to UTC, it will depend how you are indexing.

---

<div class="post-metadata">

**Author:** ![ruslan.yeraliyev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruslan.yeraliyev/32/131520_2.png) [@ruslan.yeraliyev](https://discuss.elastic.co/u/ruslan.yeraliyev)\
**Post date:** [February 22, 2024, 12:49pm UTC](https://discuss.elastic.co/t/changing-time-zone-for-elastic/352761/9 "2024-02-22T12:49:47Z")

</div>

With index it stored in UTC and we checked, everything is ok.After changind TM we restared ES and VM. But Elasticsearch logs in /var/log/ shown in previuos timezone (UTC +6). We expected it will be show in UTC +5.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 21, 2024, 12:49pm UTC](https://discuss.elastic.co/t/changing-time-zone-for-elastic/352761/10 "2024-03-21T12:49:57Z")

</div>

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