cadonna commented on code in PR #12684:
URL: https://github.com/apache/kafka/pull/12684#discussion_r1009410493
##########
clients/src/main/java/org/apache/kafka/common/utils/Utils.java:
##########
@@ -1450,4 +1453,15 @@ public static String[] enumOptions(Class<? extends
Enum<?>> enumClass) {
.toArray(String[]::new);
}
+ /**
+ * Convert time instant to readable string for logging
+ * @param timestamp the timestamp of the instant to be converted.
+ *
+ * @return string value of a given timestamp in the format "yyyy-MM-dd
HH:mm:ss,SSS"
+ */
+ public static String toLogDateTimeFormat(long timestamp) {
+ final DateTimeFormatter dateTimeFormatter =
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss,SSS");
Review Comment:
Would it be possible to add the timezone to the pattern? For example,
assuming the system default is UTC+02:00, the time could contain +02:00.
--
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]