diff --git a/src/main/java/net/szum123321/textile_backup/core/BackupHelper.java b/src/main/java/net/szum123321/textile_backup/core/BackupHelper.java index 22de8b5..38f5dc5 100644 --- a/src/main/java/net/szum123321/textile_backup/core/BackupHelper.java +++ b/src/main/java/net/szum123321/textile_backup/core/BackupHelper.java @@ -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"); + } } }