# Convert Incoming UTC timestamp to local time

**URL:** <https://discuss.elastic.co/t/convert-incoming-utc-timestamp-to-local-time/110125>\
**Category:** Logstash\
**Created:** [December 4, 2017, 11:10am UTC](https://discuss.elastic.co/t/convert-incoming-utc-timestamp-to-local-time/110125 "2017-12-04T11:10:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chivas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chivas/32/58800_2.png) [@chivas](https://discuss.elastic.co/u/chivas)\
**Post date:** [December 4, 2017, 11:10am UTC](https://discuss.elastic.co/t/convert-incoming-utc-timestamp-to-local-time/110125/1 "2017-12-04T11:10:06Z")

</div>

## Newbie here, Is there a way to convert the incoming timestamp from my log file into my local timezone, e.g. my file contains the timestamp in UTC "2017-12-01T07:30:32.425064Z", is there a way to convert this into "2017-12-01T12:30:32.425064", which is for my local time (Asia/Kolkata). I tried the below:

## date { match =\> ["datetime", "ISO8601"] timezone =\> "Asia/Kolkata" target =\> "datelog" }

However I am getting the same value for datelog field as for datetime. The reason for doing this conversion is some of my logfiles have a timestamp of UTC and some have local timestamp (Asia/Kolkata).

Any help or pointers appreciated, or am I wrong in my assumption that this conversion can be done in logstash?  
Thanks!

PS : Not sure why some of the text above is coming in bold.

---

<div class="post-metadata">

**Author:** ![chivas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chivas/32/58800_2.png) [@chivas](https://discuss.elastic.co/u/chivas)\
**Post date:** [December 4, 2017, 12:41pm UTC](https://discuss.elastic.co/t/convert-incoming-utc-timestamp-to-local-time/110125/2 "2017-12-04T12:41:28Z")

</div>

Ok so I went the other way round, instead of converting to my localtime zone, I converted the logs in localtime zone to UTC, Kibana takes care of converting them to my localtime.  
Consider this closed.

---

<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:** [January 1, 2018, 12:41pm UTC](https://discuss.elastic.co/t/convert-incoming-utc-timestamp-to-local-time/110125/3 "2018-01-01T12:41:56Z")

</div>

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