Hi,
I am using the logstash jdbc input but have problems using the jdbc_default_timezone.
The database I use has timezone Europe/Amsterdam so I thought if I set that as de defaut timezone it would work like a charm.
jdbc {
#here are the connection stuff for oracle
statement => "SELECT COL_1 DATE_TIME_COL FROM TABLE WHERE DATE_TIME_COL > :sql_last_value
schedule => "* * * * *"
clean_run => "false"
record_last_run => "true"
last_run_metadata_path => "C:\dev\elk\logstash-5.4.0\filepath\test"
tracking_column_type => "timestamp"
jdbc_default_timezone => "Europe/Amsterdam"
}
I have a record a table with DATE_TIME_COL 2017-08-19 12:19:00.123000
In the logging of logstash I see the following appended for sql_last_value.
When using Europe/Amsterdam: DATE_TIME_COL > TIMESTAMP '2017-08-18 14:18:00.123000 +02:00'
When I comment out the jdbc_default_timezone: DATE_TIME_COL > TIMESTAMP '2017-08-18 12:18:00.276000 +00:00'
When I copy-paste the generated sql and execute that in oracle I do not get any results.
In the case where I use timezone Europe/Amsterdam and I edit the sql and set the hours back two hours to 12:18
I get the expected result.
In the case where I commented out the jdbc_default_timezone, and I edit the sql and set the hours back two hours to 10:18
I get the expected result.
Any ideas where I am going wrong?
Regards Benny