# How to change +07:00 to +0700 in @timestamp?

**URL:** https://discuss.elastic.co/t/how-to-change-07-00-to-0700-in-timestamp/63027
**Category:** Logstash
**Created:** [October 14, 2016, 7:12am UTC](https://discuss.elastic.co/t/how-to-change-07-00-to-0700-in-timestamp/63027 "2016-10-14T07:12:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mgxcool](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@mgxcool](https://discuss.elastic.co/u/mgxcool)
#### Post date: [October 14, 2016, 7:12am UTC](https://discuss.elastic.co/t/how-to-change-07-00-to-0700-in-timestamp/63027/1 "2016-10-14T07:12:32Z")

</div>

Version: 2.3.4  
Operating System: CentOS

i want to change @timestamp format from 2016-10-09T11:08:57.636Z to 2016-10-09T11:08:57.636+0800  
i found two ways using filter to solve this problem  
1.  
filter {  
ruby { code =\> "event['@timestamp']=event['@timestamp'].localtime('-05:00')" }  
}  
the result:  
Ruby exception occurred: undefined method `localtime' for "2016-10-09T11:17:31.760Z":LogStash::Timestamp {:level=\>:error}

1. 

filter {  
ruby { code =\> "event['@timestamp']=event['@timestamp'].time.localtime('-05:00')" }  
}  
the result:  
"@timestamp":"2016-10-09T06:25:56.681-05:00","tags":["\_rubyexception"]  
adding a new tag with error,and the timezone has became -05:00 not 0500.

what can i do if i want to change the timezone from -05:00 to -0500 in @timestamp?

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [October 18, 2016, 6:07am UTC](https://discuss.elastic.co/t/how-to-change-07-00-to-0700-in-timestamp/63027/2 "2016-10-18T06:07:56Z")

</div>

The `@timestamp` field is meant to be UTC. Changing it to something else is not supported. If you explain why you want to make this change we might be able to suggest something.

---

<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: [July 6, 2017, 4:33am UTC](https://discuss.elastic.co/t/how-to-change-07-00-to-0700-in-timestamp/63027/3 "2017-07-06T04:33:49Z")

</div>


