# Logstash 7.11 ruby filter error

**URL:** <https://discuss.elastic.co/t/logstash-7-11-ruby-filter-error/283844>\
**Category:** Logstash\
**Created:** [September 10, 2021, 7:09am UTC](https://discuss.elastic.co/t/logstash-7-11-ruby-filter-error/283844 "2021-09-10T07:09:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shharukh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shharukh/32/139321_2.png) [@shharukh](https://discuss.elastic.co/u/shharukh)\
**Post date:** [September 10, 2021, 7:09am UTC](https://discuss.elastic.co/t/logstash-7-11-ruby-filter-error/283844/1 "2021-09-10T07:09:51Z")

</div>

Hello World,

I wanted to add 5 hours in my datetime through logstash.  
have found a way in logstash 6.4.

> ruby {  
> code =\> 'event.set("@timestamp", LogStash::Timestamp.new(Time.at(event.get("@timestamp").to\_f+86400)))'  
> }

but in logstash 7.11 its not working with the following error

![image](https://us1.discourse-cdn.com/elastic/original/3X/2/c/2cfbd7fc5cddd5ba5152333601fee664d2ed7791.png)

sorry for not sharing the logs

---

<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:** [October 8, 2021, 7:10am UTC](https://discuss.elastic.co/t/logstash-7-11-ruby-filter-error/283844/2 "2021-10-08T07:10:22Z")

</div>

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