Skip to content

Timestamp value not correcting when moving from table to table #302

@hariso

Description

@hariso

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:
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
);
  1. Insert a row: INSERT INTO timestamp_table_source (col_timestamp) VALUES (NOW() - (random() * interval '365 days'));

  2. Compare values in source and destination:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNeeds to be triaged

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions