Skip to content

Commit

Permalink
change in datetime format
Browse files Browse the repository at this point in the history
  • Loading branch information
manojks1999 committed Oct 31, 2024
1 parent 135592d commit 5ad320c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public static MetricNode fromThinString(String line) {
*/

private static DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");

public String toFatString() {
StringBuilder sb = new StringBuilder(32);
sb.delete(0, sb.length());
Expand All @@ -222,7 +222,7 @@ public String toFatString() {
sb.append(timestamp).append("|");

LocalDateTime dateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(timestamp), ZoneId.systemDefault());
sb.append(dateTime.format(df)).append("|");
sb.append(df.format(dateTime)).append("|");

String legalName = getResource().replaceAll("\\|", "_");
sb.append(legalName).append("|");
Expand Down

0 comments on commit 5ad320c

Please sign in to comment.