This caused time to be shifted by the time zone.

2.x-1.16
szymon 2020-07-09 21:03:30 +02:00
parent e2102900ed
commit f5d9947929
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ public class Utilities {
try { try {
FileTime fileTime = (FileTime) Files.getAttribute(file.toPath(), "creationTime"); FileTime fileTime = (FileTime) Files.getAttribute(file.toPath(), "creationTime");
creationTime = LocalDateTime.ofInstant(fileTime.toInstant(), ZoneOffset.UTC); creationTime = LocalDateTime.ofInstant(fileTime.toInstant(), ZoneOffset.systemDefault());
} catch (IOException ignored) {} } catch (IOException ignored) {}
if(creationTime == null) { if(creationTime == null) {