# Help me pls, I using logstash 5.5.0 input JDBC sybase but field type datetime got convert to UTC

**URL:** <https://discuss.elastic.co/t/help-me-pls-i-using-logstash-5-5-0-input-jdbc-sybase-but-field-type-datetime-got-convert-to-utc/104401>\
**Category:** Logstash\
**Created:** [October 18, 2017, 1:48pm UTC](https://discuss.elastic.co/t/help-me-pls-i-using-logstash-5-5-0-input-jdbc-sybase-but-field-type-datetime-got-convert-to-utc/104401 "2017-10-18T13:48:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prapat\_Polchan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prapat_polchan/32/20060_2.png) [@Prapat\_Polchan](https://discuss.elastic.co/u/Prapat_Polchan)\
**Post date:** [October 18, 2017, 1:48pm UTC](https://discuss.elastic.co/t/help-me-pls-i-using-logstash-5-5-0-input-jdbc-sybase-but-field-type-datetime-got-convert-to-utc/104401/1 "2017-10-18T13:48:45Z")

</div>

Help me pls, I using logstash 5.5.0 input JDBC sybase but field type datetime got convert to UTC

Example

my data field  
Default on database  
pay\_date =\> "2017-10-18 11:00:00"

But pass to Elasticsearch  
pay\_date =\>"2017-10-18T04:00:00.403Z"

Why my datetime convert to UTC i tried convert via filter  
but not work

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 19, 2017, 5:55am UTC](https://discuss.elastic.co/t/help-me-pls-i-using-logstash-5-5-0-input-jdbc-sybase-but-field-type-datetime-got-convert-to-utc/104401/2 "2017-10-19T05:55:49Z")

</div>

ES stores dates in UTC. Unless the UTC conversion was incorrectly done (like, with the wrong offset) I suggest you move on.

---

<div class="post-metadata">

**Author:** ![Prapat\_Polchan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prapat_polchan/32/20060_2.png) [@Prapat\_Polchan](https://discuss.elastic.co/u/Prapat_Polchan)\
**Post date:** [October 19, 2017, 12:35pm UTC](https://discuss.elastic.co/t/help-me-pls-i-using-logstash-5-5-0-input-jdbc-sybase-but-field-type-datetime-got-convert-to-utc/104401/3 "2017-10-19T12:35:32Z")

</div>

you example filter convert pls.

i tried filter via date{} not work and ruby.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 19, 2017, 1:02pm UTC](https://discuss.elastic.co/t/help-me-pls-i-using-logstash-5-5-0-input-jdbc-sybase-but-field-type-datetime-got-convert-to-utc/104401/4 "2017-10-19T13:02:38Z")

</div>

Sorry, I don't understand what you're asking.

---

<div class="post-metadata">

**Author:** ![Prapat\_Polchan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prapat_polchan/32/20060_2.png) [@Prapat\_Polchan](https://discuss.elastic.co/u/Prapat_Polchan)\
**Post date:** [October 19, 2017, 1:06pm UTC](https://discuss.elastic.co/t/help-me-pls-i-using-logstash-5-5-0-input-jdbc-sybase-but-field-type-datetime-got-convert-to-utc/104401/5 "2017-10-19T13:06:50Z")

</div>

i tried

event.set('pay\_date', event.get('pay\_date').time.localtime('+07:00'))

but not work

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 19, 2017, 4:37pm UTC](https://discuss.elastic.co/t/help-me-pls-i-using-logstash-5-5-0-input-jdbc-sybase-but-field-type-datetime-got-convert-to-utc/104401/6 "2017-10-19T16:37:00Z")

</div>

Elasticsearch and Kibana requires all date fields to be stored in UTC, and Kibana will automatically adjust for this in the browser based on the users time zone. If you try to store your dates in any other timezone you are likely to experience issues down the line.

---

<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:** [November 16, 2017, 4:37pm UTC](https://discuss.elastic.co/t/help-me-pls-i-using-logstash-5-5-0-input-jdbc-sybase-but-field-type-datetime-got-convert-to-utc/104401/7 "2017-11-16T16:37:03Z")

</div>

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