You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by yu...@apache.org on 2022/11/15 07:40:39 UTC

[inlong] branch master updated: [INLONG-6529] Fix microtime time zone error in mysql connector (#6530)

This is an automated email from the ASF dual-hosted git repository.

yunqing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new e223c34c5 [INLONG-6529] Fix microtime time zone error in mysql connector (#6530)
e223c34c5 is described below

commit e223c34c54ca3c6cae251c9e340b138993d36568
Author: Schnapps <zp...@connect.ust.hk>
AuthorDate: Tue Nov 15 15:40:34 2022 +0800

    [INLONG-6529] Fix microtime time zone error in mysql connector (#6530)
---
 .../sort/cdc/debezium/table/RowDataDebeziumDeserializeSchema.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inlong-sort/sort-connectors/mysql-cdc/src/main/java/org/apache/inlong/sort/cdc/debezium/table/RowDataDebeziumDeserializeSchema.java b/inlong-sort/sort-connectors/mysql-cdc/src/main/java/org/apache/inlong/sort/cdc/debezium/table/RowDataDebeziumDeserializeSchema.java
index a7231a83e..96777c5ee 100644
--- a/inlong-sort/sort-connectors/mysql-cdc/src/main/java/org/apache/inlong/sort/cdc/debezium/table/RowDataDebeziumDeserializeSchema.java
+++ b/inlong-sort/sort-connectors/mysql-cdc/src/main/java/org/apache/inlong/sort/cdc/debezium/table/RowDataDebeziumDeserializeSchema.java
@@ -630,7 +630,7 @@ public final class RowDataDebeziumDeserializeSchema
         switch (schemaName) {
             case MicroTime.SCHEMA_NAME:
                 Instant instant = Instant.ofEpochMilli((Long) fieldValue / 1000);
-                fieldValue = timeFormatter.format(LocalDateTime.ofInstant(instant, serverTimeZone));
+                fieldValue = timeFormatter.format(LocalDateTime.ofInstant(instant, ZONE_UTC));
                 break;
             case Date.SCHEMA_NAME:
                 fieldValue = dateFormatter.format(LocalDate.ofEpochDay((Integer) fieldValue));