SAP / kafka-connect-sap

Kafka Connect SAP is a set of connectors, using the Apache Kafka Connect framework for reliably connecting Kafka with SAP systems
Apache License 2.0
122 stars 56 forks source link

Timezone configuration is not correct #133

Open harshrajsinha opened 2 years ago

harshrajsinha commented 2 years ago

Hi Team my database in running on local timezone (IST, Asia/Kolkata). While creating source connector I am providing db.timezone as "Asia/Kolkata", but source connector is publishing datetime field to GMT before publishing into topic.

In the screen shot attached I have used TRADE_DATE column for incremental data load, this column is of TIMESTAMP.

In the below screen shot you can see, TRADE_DATE = '2022-08-22 11:16:01.000' image

In the message published in the topic TRADE_DATE = '1661166961000' which is "Monday, August 22, 2022 4:46:01 PM" in my timezone. image

Configuration screen shot. image

Please help me understand what I am doing wrong.

elakito commented 2 years ago

In HANA, the stored timestamp values are in UTC. Our current source connector code use HANA JDBC's getTimestamp method with the UTC calendar so that we already get the correct UTC timestamp value from the query result. There is no additional timezone conversion in the connector. Which tool are you using to display the timestamp value?