# Wrong Timestampz value (minute) when using Kafka Connect to stream data from Postgres to Clickhouse

**URL:** <https://forum.confluent.io/t/wrong-timestampz-value-minute-when-using-kafka-connect-to-stream-data-from-postgres-to-clickhouse/37493>\
**Category:** Kafka Connect\
**Created:** [17 March 2025 06:41 UTC](https://forum.confluent.io/t/wrong-timestampz-value-minute-when-using-kafka-connect-to-stream-data-from-postgres-to-clickhouse/37493 "2025-03-17T06:41:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hoalth](https://avatars.discourse-cdn.com/v4/letter/h/47e85d/32.png) [@hoalth](https://forum.confluent.io/u/hoalth)\
**Post date:** [17 March 2025 06:41 UTC](https://forum.confluent.io/t/wrong-timestampz-value-minute-when-using-kafka-connect-to-stream-data-from-postgres-to-clickhouse/37493/1 "2025-03-17T06:41:57Z")

</div>

I’m maintaining a streaming data system with Kafka Connect and got struggle when source data is timestampz. The value in message will be come:

```auto
"date_txn": "2025-03-05T04:33:45.844195Z"

```

In schema registry

```auto
{
    "name": "date_txn",
    "type": {
        "type": "string",
        "connect.version": 1,
        "connect.name": "io.debezium.time.ZonedTimestamp"
    }
}

```

My sink connector

```auto
{
    "connector.class": "io.confluent.connect.jdbc.JdbcSinkConnector",
    "transforms.TimestampConverter.target.type": "Timestamp",
    "connection.password": " ******",
    "transforms.TimestampConverter.field": "date_txn",
    "tasks.max": "1",
    "transforms": "unwrap,TimestampConverter",
    "auto.evolve": "true",
    "transforms.unwrap.drop.tombstones": "false",
    "transforms.unwrap.type": "io.debezium.transforms.ExtractNewRecordState",
    "value.converter": "io.confluent.connect.avro.AvroConverter",
    "insert.mode": "insert",
    "key.converter": "io.confluent.connect.avro.AvroConverter",
    "table.name.format": "table",
    "dialect.name": "PostgreSqlDatabaseDialect",
    "transforms.TimestampConverter.type": "org.apache.kafka.connect.transforms.TimestampConverter$Value",
    "topics": "default.table",
    "time.precision.mode": "connect",
    "transforms.TimestampConverter.format": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
    "key.converter.schemas.enable": "true",
    "value.converter.schema.registry.url": "http://schema-registry",
    "delete.enabled": "true",
    "connection.user": "u_connect",
    "value.converter.schemas.enable": "true",
    "name": "ch-table",
    "auto.create": "true",
    "connection.url": "jdbc:clickhouse://locahost:9120/default",
    "key.converter.schema.registry.url": "http://schema-registry",
    "pk.mode": "record_key"
}

```

date\_txn value in my destination table is:

```auto
2025-03-05 11:52:59.206 +0700

```

The hour is correct as I expected (I’m living in GMT +7) but the minutes is kind of weird. I’ve been searched through a lot of document but still have no idea why the time automatically increase by a few more minutes? I switched sink connector to another Postgres instance and received the same result. So I think maybe the SMT TimestampConverter have some bugs or some config that I haven’t known.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [16 April 2025 06:42 UTC](https://forum.confluent.io/t/wrong-timestampz-value-minute-when-using-kafka-connect-to-stream-data-from-postgres-to-clickhouse/37493/2 "2025-04-16T06:42:19Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
