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


(Prapat Polchan) #1

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


(Magnus Bäck) #2

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


(Prapat Polchan) #3

you example filter convert pls.

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


(Magnus Bäck) #4

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


(Prapat Polchan) #5

i tried

event.set('pay_date', event.get('pay_date').time.localtime('+07:00'))

but not work


(Christian Dahlqvist) #6

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.


(system) #7

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