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
119 stars 54 forks source link

Use UTC for date, time, timestamp consistently #124

Closed elakito closed 2 years ago

elakito commented 2 years ago

Inserting date time related values that correspond to the UTC values without specifying the UTC calendar will store the values converted to the local values. This will cause the values later retrieved as UTC to be incorrect. To avoid this problem, use UTC for both storing and retrieving the date time related values.

This will fix #121.

AndreasKlein commented 2 years ago

@elakito shall I test this?

elakito commented 2 years ago

@AndreasKlein As mentioned, the first commit makes the writing and reading part consistent for datetime values using UTC. The second commit ensures the incremental query uses UTC. I think this should fix the problem that you observed. The incremental query code should be refactored in the future to not use string values, though. If you verify that this works for your scenario, that would be great. Thanks.