diff --git a/name.abuchen.portfolio/src/name/abuchen/portfolio/util/BuildInfo.java b/name.abuchen.portfolio/src/name/abuchen/portfolio/util/BuildInfo.java index 2866082886..a3929de54d 100644 --- a/name.abuchen.portfolio/src/name/abuchen/portfolio/util/BuildInfo.java +++ b/name.abuchen.portfolio/src/name/abuchen/portfolio/util/BuildInfo.java @@ -1,10 +1,14 @@ package name.abuchen.portfolio.util; +import java.time.Instant; import java.time.LocalDateTime; +import java.time.ZoneId; import java.time.format.DateTimeParseException; import java.util.MissingResourceException; import java.util.ResourceBundle; +import name.abuchen.portfolio.PortfolioLog; + public enum BuildInfo { INSTANCE; @@ -27,10 +31,11 @@ private LocalDateTime readBuildTime() { // timestamp is written into build-info.properties by Maven ResourceBundle bundle = ResourceBundle.getBundle("build-info"); //$NON-NLS-1$ - return LocalDateTime.parse(bundle.getString("build.timestamp")); //$NON-NLS-1$ + return Instant.parse(bundle.getString("build.timestamp")).atZone(ZoneId.systemDefault()).toLocalDateTime(); //$NON-NLS-1$ } catch (MissingResourceException | DateTimeParseException e) { + PortfolioLog.error(e); return LocalDateTime.now(); } }