Merge pull request #2 from 1a2s3d4f1/master

Compatible Windows
This commit is contained in:
Szum123321 2020-01-30 07:18:15 +01:00 committed by GitHub
commit d73042138e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,6 +99,11 @@ public class BackupHelper {
}
public static DateTimeFormatter getDateTimeFormatter(){
return DateTimeFormatter.ofPattern("dd.MM.yyyy_HH:mm:ss");
String os = System.getProperty("os.name");
if (os.toLowerCase().startsWith("win")) {
return DateTimeFormatter.ofPattern("dd.MM.yyyy_HH-mm-ss");
} else {
return DateTimeFormatter.ofPattern("dd.MM.yyyy_HH:mm:ss");
}
}
}