ashmeet13 commented on PR #12684:
URL: https://github.com/apache/kafka/pull/12684#issuecomment-1272513555
Hi @divijvaidya, @vvcephei - I have made the suggested changes and defined a
new function to convert timestamps to a readable format -
```
private String formatInstantTime(final long instant) {
final DateTimeFormatter dateTimeFormatter =
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss,SSS");
return
Instant.ofEpochMilli(instant).atZone(ZoneId.systemDefault()).format(dateTimeFormatter);
}
```
Currently defined within the classes it is needed for though I believe this
function is better defined within a `utils` package. Not sure where that would
be.
Please have a look at the implementation and let me know if any improvements
are required.
--
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]