# Logstash timezone while creating index

**URL:** <https://discuss.elastic.co/t/logstash-timezone-while-creating-index/215623>\
**Category:** Logstash\
**Created:** [January 19, 2020, 1:33pm UTC](https://discuss.elastic.co/t/logstash-timezone-while-creating-index/215623 "2020-01-19T13:33:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bdn/32/136737_2.png) [@bdn](https://discuss.elastic.co/u/bdn)\
**Post date:** [January 19, 2020, 1:33pm UTC](https://discuss.elastic.co/t/logstash-timezone-while-creating-index/215623/1 "2020-01-19T13:33:58Z")

</div>

As I found logstash create an Index on UTC timezone. How can I create an index on the local timezone? I have set up an ES client that needs to query the index day-wise in local time.

```
output {
elasticsearch {
     hosts => ["localhost:9200"]
    index => "logstash-%{+YYYY-MM-dd}"
    manage_template => false }
    stdout { codec => rubydebug }
}
```

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [January 19, 2020, 2:46pm UTC](https://discuss.elastic.co/t/logstash-timezone-while-creating-index/215623/2 "2020-01-19T14:46:08Z")

</div>

elasticsearch always stores documents with the timestamp in UTC. It is the responsibility of the clients, such as kibana, to convert those timestamps to the timezone of the consumer (since there may be consumers in multiple timezones).

You can have logstash lie about which timezone events are in, but that may lead to problems in other parts of the elastic stack.

---

<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, 2020, 2:46pm UTC](https://discuss.elastic.co/t/logstash-timezone-while-creating-index/215623/3 "2020-02-16T14:46:14Z")

</div>

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