8330533: JFR: LocalDateTime should not use milliseconds since epoch

Reviewed-by: aturbanov, mgronlun
This commit is contained in:
Erik Gahlin 2024-04-18 11:59:57 +00:00
parent b648ed0a08
commit 5853a2c009

View File

@ -109,7 +109,7 @@ public final class Repository {
return LocalDateTime.now();
} catch (DateTimeException d) {
Logger.log(LogTag.JFR, LogLevel.INFO, "Could not create LocalDateTime with the default time zone. Using UTC time zone for chunk filename.");
return LocalDateTime.ofEpochSecond(System.currentTimeMillis(), 0, ZoneOffset.UTC);
return LocalDateTime.now(ZoneOffset.UTC);
}
}