thesumery commented on code in PR #6257:
URL: https://github.com/apache/inlong/pull/6257#discussion_r1001467594
##########
inlong-sort/sort-connectors/mysql-cdc/src/main/java/org/apache/inlong/sort/cdc/debezium/table/RowDataDebeziumDeserializeSchema.java:
##########
@@ -635,14 +634,10 @@ private Object getTimeValue(Object fieldValue, String
schemaName) {
fieldValue =
dateFormatter.format(LocalDate.ofEpochDay((Integer) fieldValue));
break;
case ZonedTimestamp.SCHEMA_NAME:
- ZonedDateTime zonedDateTime =
ZonedDateTime.parse((CharSequence) fieldValue);
- fieldValue = timestampFormatter.format(zonedDateTime
-
.withZoneSameInstant(serverTimeZone).toLocalDateTime());
+ // by default the field value is zoned timestamp, no need to
convert
break;
case Timestamp.SCHEMA_NAME:
- Instant instantTime = Instant.ofEpochMilli((Long) fieldValue);
- fieldValue =
timestampFormatter.format(LocalDateTime.ofInstant(instantTime,
- serverTimeZone));
+ fieldValue = Instant.ofEpochMilli((Long)
fieldValue).toString();
Review Comment:
think about timezone problem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]