hi all,
I am using logstash 2.1.3 ,I want to show the @timestamp field in my timezone, like "@timestamp" => "2015-03-09T04:24:29.718+08:00", I try to using ruby conversion in filter.
filter {
ruby {
code => "event['@timestamp'] = event['@timestamp'].localtime('+08:00')"
}
}
but i got the error msg as below,
Ruby exception occurred: undefined method `localtime' for "2016-04-29T00:40:51.926Z":LogStash::Timestamp {:level=>:error}
Any help is welcome to resolve this.