ConduitIO / ConduitIO/conduit-connector-postgres
Timestamp value not correcting when moving from table to table
- Dominant language
- Go
- Stars
- 19
- Forks
- 12
- Avg merge
- 12h 20m
- Merged PRs (30d)
- 5
Description
### Bug description
When moving data from a Postgres table to another Postgres table, a timestamp value is not correctly written. One hour is added to the destination value. This might be due to time zones not being correctly handled.
### Steps to reproduce
1. Set up two tables with timestamp columns:
```sql
DROP TABLE IF EXISTS timestamp_table_source;
CREATE TABLE timestamp_table_source (
id bigserial PRIMARY KEY,
col_timestamp timestamp
);
DROP TABLE IF EXISTS timestamp_table_destination;
CREATE TABLE timestamp_table_destination (
id bigserial PRIMARY KEY,
col_timestamp timestamp
);
```
2. Insert a row: `INSERT INTO timestamp_table_source (col_timestamp) VALUES (NOW() - (random() * interval '365 days'));`
3. Compare values in source and destination:
```sql
meroxadb=# select * from timestamp_table_source;
id | col_timestamp
----+----------------------------
1 | 2024-12-09 08:41:13.492536
(1 row)
meroxadb=# select * from timestamp_table_destination;
id | col_timestamp
----+----------------------------
1 | 2024-12-09 09:41:13.492536
(1 row)
```
### Version
v0.14.0
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the transfer between the PostgreSQL source and destination tables using the provided timestamp schema and query, then trace the connector's timestamp handling. Done means the destination col_timestamp matches the source value without the one-hour offset, including for the v0.14.0 reproduction case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100