# How to change @timestamp from UTC timezone to Other timezone

**URL:** https://discuss.elastic.co/t/how-to-change-timestamp-from-utc-timezone-to-other-timezone/231838
**Category:** Logstash
**Created:** [May 9, 2020, 11:54am UTC](https://discuss.elastic.co/t/how-to-change-timestamp-from-utc-timezone-to-other-timezone/231838 "2020-05-09T11:54:41Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![abdorrezahadi](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@abdorrezahadi](https://discuss.elastic.co/u/abdorrezahadi)
#### Post date: [May 9, 2020, 11:54am UTC](https://discuss.elastic.co/t/how-to-change-timestamp-from-utc-timezone-to-other-timezone/231838/1 "2020-05-09T11:54:42Z")

</div>

Logstash generates indexes based on @timestamp with UTC time, if I want to get documents from  
2020-05-08 to 2020-05-09 with my timezone, I need to search indexes logstash-2020-05-07 and  
logstash-2020-05-08, if I can change the @timestamp to my timezone direct, I think I can directly search the index logstash-2020.05.08.  
therefore, how can i change @timestamp timezone to my timezone or how can i create another field that contains @timestamp with my timezone?

---

<div class="post-metadata">

### Author: ![Rahul\_Kumar4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rahul_kumar4/32/67369_2.png) [@Rahul\_Kumar4](https://discuss.elastic.co/u/Rahul_Kumar4)
#### Post date: [May 10, 2020, 1:18am UTC](https://discuss.elastic.co/t/how-to-change-timestamp-from-utc-timezone-to-other-timezone/231838/2 "2020-05-10T01:18:33Z")

</div>

> [@abdorrezahadi](#):
>
> therefore, how can i change @timestamp timezone to my timezone or how can i create another field that contains @timestamp with my timezone?

You can create a Kibana scripted field using the Painless language as explained [here.](https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-datetime.html#_datetime_zone_examples)

But that field will only be available for querying within Kibana since it is a scripted field. If you want this field to be available in Elasticsearch then you will have to replay/reindex your logs and use the date filter in Logstash to set the timezone.

---

<div class="post-metadata">

### Author: ![abdorrezahadi](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@abdorrezahadi](https://discuss.elastic.co/u/abdorrezahadi)
#### Post date: [May 14, 2020, 9:01am UTC](https://discuss.elastic.co/t/how-to-change-timestamp-from-utc-timezone-to-other-timezone/231838/3 "2020-05-14T09:01:04Z")

</div>

Hi.Thanks for your feedback.

I won't use Kibana for quering to Elasticsearch.  
i want to created a filed same as @timestamp that it on my timezone.

---

<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: [June 11, 2020, 9:01am UTC](https://discuss.elastic.co/t/how-to-change-timestamp-from-utc-timezone-to-other-timezone/231838/4 "2020-06-11T09:01:15Z")

</div>

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