# How to replace @timestamp field in logstash aggregate filter map

**URL:** https://discuss.elastic.co/t/how-to-replace-timestamp-field-in-logstash-aggregate-filter-map/275708
**Category:** Logstash
**Created:** [June 11, 2021, 6:08pm UTC](https://discuss.elastic.co/t/how-to-replace-timestamp-field-in-logstash-aggregate-filter-map/275708 "2021-06-11T18:08:24Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [June 11, 2021, 7:13pm UTC](https://discuss.elastic.co/t/how-to-replace-timestamp-field-in-logstash-aggregate-filter-map/275708/2 "2021-06-11T19:13:49Z")

</div>

@timestamp has to be a LogStash::Timestamp. You could try

```
event.set("@timestamp", LogStash::Timestamp.new(Time.utc(2021, 6, 10, 19, 0, 0))
```

---

_[View the full topic](https://discuss.elastic.co/t/how-to-replace-timestamp-field-in-logstash-aggregate-filter-map/275708)._
