commit | b7df4e2823890b84f10a8b1db3ebed9cc6097efe | [log] [tgz] |
---|---|---|
author | Alexandre Rostovtsev <arostovtsev@google.com> | Tue Apr 16 18:14:50 2024 -0400 |
committer | GitHub <noreply@github.com> | Tue Apr 16 18:14:50 2024 -0400 |
tree | 3b6241c6a39e8c0f2c1145f70a04e357f4bdb41d | |
parent | ba34bb7e94f143fc7a2e5d0658b010b4f86bc9cd [diff] |
Simplify Instant creation from epoch seconds (#211) Recommended by internal linter.
diff --git a/src/main/java/com/google/devtools/build/skydoc/rendering/MarkdownUtil.java b/src/main/java/com/google/devtools/build/skydoc/rendering/MarkdownUtil.java index 6db2f43..4ddce0f 100644 --- a/src/main/java/com/google/devtools/build/skydoc/rendering/MarkdownUtil.java +++ b/src/main/java/com/google/devtools/build/skydoc/rendering/MarkdownUtil.java
@@ -463,7 +463,7 @@ if (isNullOrEmpty(buildTimestampSeconds)) { return ""; } - return Instant.ofEpochMilli(Long.parseLong(buildTimestampSeconds) * 1000) + return Instant.ofEpochSecond(Long.parseLong(buildTimestampSeconds)) .atZone(ZoneId.of(zoneId)) .format(DateTimeFormatter.ofPattern(format)); }