You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In theory, the connector should fetch data using the timezone but that's not what I can observe.
Example:
1 -- now() update transaction t set updated_at = now() where t.id_transaction = 1;
2 -- now() + INTERVAL 1 HOUR update transaction t set updated_at = now() + INTERVAL 1 HOUR where t.id_transaction = 2;
3 -- now() + INTERVAL 2 HOUR update transaction t set updated_at = now() + INTERVAL 2 HOUR where t.id_transaction = 3;
4 -- now() + INTERVAL 3 HOUR update transaction t set updated_at = now() + INTERVAL 3 HOUR where t.id_transaction = 4;
5 -- now() + INTERVAL 4 HOUR update transaction t set updated_at = now() + INTERVAL 4 HOUR where t.id_transaction = 5;
When creating the connector I would expect to fetch the row (4) that match the timezone, but what I get is (1).
And the payload instead of having the field updated_at in unix_timestamp I get the value with a time diff 3 hours ago. The same behavior is reflected on the topic connect_offset where timestamp is also 3 hours ago.
Assuming now() is 1707477449 - 2024-02-09 11:17:29
Hi,
My JDBC Source Connector config is:
Using:
The timezone Africa/Nairobi is UTC+3.
In theory, the connector should fetch data using the timezone but that's not what I can observe.
Example:
1 -- now()
update transaction t set updated_at = now() where t.id_transaction = 1;
2 -- now() + INTERVAL 1 HOUR
update transaction t set updated_at = now() + INTERVAL 1 HOUR where t.id_transaction = 2;
3 -- now() + INTERVAL 2 HOUR
update transaction t set updated_at = now() + INTERVAL 2 HOUR where t.id_transaction = 3;
4 -- now() + INTERVAL 3 HOUR
update transaction t set updated_at = now() + INTERVAL 3 HOUR where t.id_transaction = 4;
5 -- now() + INTERVAL 4 HOUR
update transaction t set updated_at = now() + INTERVAL 4 HOUR where t.id_transaction = 5;
When creating the connector I would expect to fetch the row (4) that match the timezone, but what I get is (1).
And the payload instead of having the field updated_at in unix_timestamp I get the value with a time diff 3 hours ago. The same behavior is reflected on the topic connect_offset where timestamp is also 3 hours ago.
Assuming now() is 1707477449 - 2024-02-09 11:17:29
Message on topic connect_offset:
where timestamp is 1707466649 which is 2024-02-09 08:17:29 => 3 hours ago from the database record. I was expecting 3 hours later!!!.
It seems the timezone is being applied in reverse mode.
Note: the database is MySQL.
Does anyone have the same setup? Is it bad config? Should the timezone be defined on the connection url instead?
I posted the question also on https://stackoverflow.com/questions/77967883/jdbc-source-kafka-connect-db-timezone-is-not-applied-on-the-enddate.
The text was updated successfully, but these errors were encountered: