ComingWen commented on code in PR #20402:
URL: https://github.com/apache/kafka/pull/20402#discussion_r2434429837


##########
connect/transforms/src/main/java/org/apache/kafka/connect/transforms/TimestampConverter.java:
##########
@@ -293,12 +301,18 @@ public void configure(Map<String, ?> configs) {
         final String type = simpleConfig.getString(TARGET_TYPE_CONFIG);
         String formatPattern = simpleConfig.getString(FORMAT_CONFIG);
         final String unixPrecision = 
simpleConfig.getString(UNIX_PRECISION_CONFIG);
+        final String time_zone = simpleConfig.getString(TIMEZONE_CONFIG);
         schemaUpdateCache = new SynchronizedCache<>(new LRUCache<>(16));
         replaceNullWithDefault = 
simpleConfig.getBoolean(REPLACE_NULL_WITH_DEFAULT_CONFIG);
 
         if (type.equals(TYPE_STRING) && Utils.isBlank(formatPattern)) {
             throw new ConfigException("TimestampConverter requires format 
option to be specified when using string timestamps");
         }
+
+        if (!Utils.isBlank(time_zone)) {
+            UTC = TimeZone.getTimeZone(time_zone);

Review Comment:
   Adjusted the code based on feedback,please review again,thank you very much !



-- 
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]

Reply via email to