# Unable to convert date from string/ change @timestamp value

**URL:** <https://discuss.elastic.co/t/unable-to-convert-date-from-string-change-timestamp-value/216394>\
**Category:** Logstash\
**Created:** [January 24, 2020, 9:22am UTC](https://discuss.elastic.co/t/unable-to-convert-date-from-string-change-timestamp-value/216394 "2020-01-24T09:22:23Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ITIC](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@ITIC](https://discuss.elastic.co/u/ITIC)\
**Post date:** [January 24, 2020, 11:41am UTC](https://discuss.elastic.co/t/unable-to-convert-date-from-string-change-timestamp-value/216394/2 "2020-01-24T11:41:54Z")

</div>

Hi

I think you could use something like **_[this](https://discuss.elastic.co/t/time-in-ist-for-log-rotation-logstash/211612/2)_**.

The OP in that case was trying to use the local time, as converted from timestamp, to name files. The solution should be the same: you also want to convert the timestamp into your local time, if I unerstood your post corretly. Just substitute `filename` for your `newts`, play with the time format, and you should be good to go.

This will not change `@timestamp` itself (and apparently there are reasons why you shouldn't), but you will get a variable with the local time that you can use.

Hope this helps

---

_[View the full topic](https://discuss.elastic.co/t/unable-to-convert-date-from-string-change-timestamp-value/216394)._
