# Logstash update @timestamp

**URL:** https://discuss.elastic.co/t/logstash-update-timestamp/77816
**Category:** Logstash
**Created:** [March 8, 2017, 1:00pm UTC](https://discuss.elastic.co/t/logstash-update-timestamp/77816 "2017-03-08T13:00:39Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![Exocomp](https://avatars.discourse-cdn.com/v4/letter/e/ea5d25/32.png) [@Exocomp](https://discuss.elastic.co/u/Exocomp)
#### Post date: [March 9, 2017, 3:26pm UTC](https://discuss.elastic.co/t/logstash-update-timestamp/77816/8 "2017-03-09T15:26:29Z")

</div>

@magnusbaeck

Ok, ruby filter is the winner. This worked.

```
	ruby {
		code => "event.set('@timestamp', event.get('last_execution_time'));"
	} 

"last_execution_time" => 2017-03-09T04:07:51.520Z
"@timestamp" => 2017-03-09T04:07:51.520Z

```

Is that ok to use or do you know of a more optimal way ?

Thanks,  
E

---

_[View the full topic](https://discuss.elastic.co/t/logstash-update-timestamp/77816)._
