# How to set timezone？logstash version 5.x

**URL:** <https://discuss.elastic.co/t/how-to-set-timezone-logstash-version-5-x/87193>\
**Category:** Logstash\
**Created:** [May 26, 2017, 1:35am UTC](https://discuss.elastic.co/t/how-to-set-timezone-logstash-version-5-x/87193 "2017-05-26T01:35:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Swime](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@Swime](https://discuss.elastic.co/u/Swime)\
**Post date:** [May 26, 2017, 1:35am UTC](https://discuss.elastic.co/t/how-to-set-timezone-logstash-version-5-x/87193/1 "2017-05-26T01:35:05Z")

</div>

Hello, resently I use logstash 5.4 and try to change the timezone like the way bellow.But it does not work. Is that any fault ? And how can I set the timezone? Thx,please.

filter{  
mutate{  
add\_field =\> ["time","%{@timestamp}"]  
}  
date {  
match =\> ["time", "YYYY-MM-dd'T'HH:mm:ss.SSSZ"]  
timezone =\> "America/Montreal"  
}  
}

---

<div class="post-metadata">

**Author:** ![Swime](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@Swime](https://discuss.elastic.co/u/Swime)\
**Post date:** [May 26, 2017, 1:36am UTC](https://discuss.elastic.co/t/how-to-set-timezone-logstash-version-5-x/87193/2 "2017-05-26T01:36:07Z")

</div>

{  
"path" =\> "/var/log/secure",  
"@timestamp" =\> 2017-05-26T01:37:11.933Z,  
"@version" =\> "1",  
"host" =\> "cluster-01",  
"time" =\> "2017-05-26T01:37:11.933Z",  
"message" =\> "May 26 09:37:11 cluster-01 sshd[21672]: Received disconnect from 192.1.1.11: 13: The user canceled authentication. "  
}

---

<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 23, 2017, 1:36am UTC](https://discuss.elastic.co/t/how-to-set-timezone-logstash-version-5-x/87193/3 "2017-06-23T01:36:12Z")

</div>

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