# Timezone of kibana logs should be same host's timezone

**URL:** <https://discuss.elastic.co/t/timezone-of-kibana-logs-should-be-same-hosts-timezone/261008>\
**Category:** Kibana\
**Created:** [January 13, 2021, 2:17pm UTC](https://discuss.elastic.co/t/timezone-of-kibana-logs-should-be-same-hosts-timezone/261008 "2021-01-13T14:17:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![pratiksha](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@pratiksha](https://discuss.elastic.co/u/pratiksha)\
**Post date:** [January 13, 2021, 2:17pm UTC](https://discuss.elastic.co/t/timezone-of-kibana-logs-should-be-same-hosts-timezone/261008/1 "2021-01-13T14:17:57Z")

</div>

We are using ELK 7.8.0 version and want to have kibana logs in the same timezone as host's timezone.  
In this topic "[Changing the timezone of logs written in logging.dest in kibana.yml](https://discuss.elastic.co/t/changing-the-timezone-of-logs-written-in-logging-dest-in-kibana-yml/117564)" it is suggested to use logging.useUTC parameter to disable UTC format and use local timezone. However, for 7.8 version we have logging.timezone parameter but it requires a canonical timezone id and in our case we need it to automatically have the same timezone from local. So, Is there any way to configure logs to have same timestamp as local timezone?

Thanks.

---

<div class="post-metadata">

**Author:** ![monfera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/monfera/32/26467_2.png) [@monfera](https://discuss.elastic.co/u/monfera)\
**Post date:** [January 18, 2021, 9:56am UTC](https://discuss.elastic.co/t/timezone-of-kibana-logs-should-be-same-hosts-timezone/261008/2 "2021-01-18T09:56:15Z")

</div>

Hello pratiksha, I don't fully understand the issue yet, can you clarify please?

> We are using ELK 7.8.0 version and want to have kibana logs in the same timezone as host's timezone.

Ie. you don't want to use the default, which is the use of UTC time stamps, ie. your plan was to use `logging.useUTC: false` right? As of `7.0` the `logging.useUTC` is [no longer valid](https://www.elastic.co/guide/en/kibana/current/breaking-changes-7.0.html#_logging_useutc_is_no_longer_valid) so if I understand, you're looking at `logging.timezone`.

> for 7.8 version we have logging.timezone parameter but it requires a canonical timezone id

So if I understand, you want to avoid the explicit assignment of timezone. Is it for convenience, or is there some other reason for it? Just trying to understand the use case.

> So, Is there any way to configure logs to have same timestamp as local timezone?

Local, in reference of what exactly? You mention "host" on top. Various servers in the stack can be in diverse time zones, so I'd like to clarify the exact component you refer to, as I'm not familiar with your setup.

---

<div class="post-metadata">

**Author:** ![pratiksha](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@pratiksha](https://discuss.elastic.co/u/pratiksha)\
**Post date:** [January 18, 2021, 10:05am UTC](https://discuss.elastic.co/t/timezone-of-kibana-logs-should-be-same-hosts-timezone/261008/3 "2021-01-18T10:05:07Z")

</div>

Yes, we are using logging.timezone parameter to set the timezone in logs.  
We have a usecase where we need to have the timezone of the host and kibana logs should be same.  
Like, logging.timezone should be able to pick the timezone from '/etc/localtime' in the host to get the timezone.  
Is there anyway that this can be configured?

---

<div class="post-metadata">

**Author:** ![monfera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/monfera/32/26467_2.png) [@monfera](https://discuss.elastic.co/u/monfera)\
**Post date:** [January 18, 2021, 10:19am UTC](https://discuss.elastic.co/t/timezone-of-kibana-logs-should-be-same-hosts-timezone/261008/4 "2021-01-18T10:19:26Z")

</div>

Thanks for the added detail, I'm not aware of such option post 7.0. Is this value changing over time btw.? I don't yet fully understand the situation. Can't you just set the `logging.timezone` to the time zone of the host? Wouldn't it be analogous to using `logging.useUTC: false` pre 7.0?

---

<div class="post-metadata">

**Author:** ![pratiksha](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@pratiksha](https://discuss.elastic.co/u/pratiksha)\
**Post date:** [January 18, 2021, 10:31am UTC](https://discuss.elastic.co/t/timezone-of-kibana-logs-should-be-same-hosts-timezone/261008/5 "2021-01-18T10:31:56Z")

</div>

Thanks for the reply, yes we can set the logging.timezone to the timezone of the host. But in one of the scenario in containerized environment we are setting pod's timezone to be picked from /etc/localtime of server machine and similarly we also need to set logging.timezone value to have same value from /etc/localtime, so that logs can be in the same timezone.  
Please suggest if there is any way we can configure this.

---

<div class="post-metadata">

**Author:** ![monfera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/monfera/32/26467_2.png) [@monfera](https://discuss.elastic.co/u/monfera)\
**Post date:** [January 18, 2021, 12:07pm UTC](https://discuss.elastic.co/t/timezone-of-kibana-logs-should-be-same-hosts-timezone/261008/6 "2021-01-18T12:07:26Z")

</div>

As I assume it's at discrete points in time when you change `/etc/localtime`, probably via a script, is it possible for you to update the `logging.timezone` simultaneously?

---

<div class="post-metadata">

**Author:** ![pratiksha](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@pratiksha](https://discuss.elastic.co/u/pratiksha)\
**Post date:** [January 18, 2021, 12:13pm UTC](https://discuss.elastic.co/t/timezone-of-kibana-logs-should-be-same-hosts-timezone/261008/7 "2021-01-18T12:13:49Z")

</div>

We are mounting the /etc/localtime of server inside the pod to update /etc/localtime of container, but we cannot do the same for logging.timezone since it takes only timezone id as its value. That is why need to have some other way to update logging.timezone value.

Thanks

---

<div class="post-metadata">

**Author:** ![pratiksha](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@pratiksha](https://discuss.elastic.co/u/pratiksha)\
**Post date:** [January 19, 2021, 11:22am UTC](https://discuss.elastic.co/t/timezone-of-kibana-logs-should-be-same-hosts-timezone/261008/8 "2021-01-19T11:22:20Z")

</div>

Please suggest if there is any way through which we can achieve this.

Thanks

---

<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:** [February 16, 2021, 11:22am UTC](https://discuss.elastic.co/t/timezone-of-kibana-logs-should-be-same-hosts-timezone/261008/9 "2021-02-16T11:22:41Z")

</div>

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