# Solr6 & Logstash 5: timestamp error

**URL:** <https://discuss.elastic.co/t/solr6-logstash-5-timestamp-error/67223>\
**Category:** Logstash\
**Created:** [November 25, 2016, 10:44pm UTC](https://discuss.elastic.co/t/solr6-logstash-5-timestamp-error/67223 "2016-11-25T22:44:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![seanoc5](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@seanoc5](https://discuss.elastic.co/u/seanoc5)\
**Post date:** [November 25, 2016, 10:44pm UTC](https://discuss.elastic.co/t/solr6-logstash-5-timestamp-error/67223/1 "2016-11-25T22:44:30Z")

</div>

Hi all,  
I am new to logstash (and completely new to ruby) and hit a slight snag when using solr\_http. Apparently the tmiestamp code around line 65 in solr\_hhtp.rb has the following code:  
document["@timestamp"] = document["@timestamp"].to\_time.iso8601 #make the timestamp ISO  
It throws an error something like:  
17:42:08.943 [Ruby-0-Thread-8: /usr/share/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/buffer.rb:92] WARN logstash.outputs.solrhttp - An error occurred while indexing: undefined method `to\_time' for 2016-11-25T22:42:08.234Z:LogStash::Timestamp

In case anyone else hits this snag I just commented out the ".to\_time.iso8601". I'm sure someone familiar with ruby can easily improve on this, but I figured I'd post what I have in the meantime.  
Cheers,

Sean

---

<div class="post-metadata">

**Author:** ![jetnet](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jetnet](https://discuss.elastic.co/u/jetnet)\
**Post date:** [December 10, 2016, 11:25am UTC](https://discuss.elastic.co/t/solr6-logstash-5-timestamp-error/67223/2 "2016-12-10T11:25:18Z")

</div>

Thanks, Sean! you saved a couple of hours of my life 🙂

---

<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:** [January 7, 2017, 11:25am UTC](https://discuss.elastic.co/t/solr6-logstash-5-timestamp-error/67223/3 "2017-01-07T11:25:28Z")

</div>

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