diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/modules/backup/BackupCleaner.java b/pandalib-paper/src/main/java/fr/pandacube/lib/paper/modules/backup/BackupCleaner.java index 4d42ccb..e4b2203 100644 --- a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/modules/backup/BackupCleaner.java +++ b/pandalib-paper/src/main/java/fr/pandacube/lib/paper/modules/backup/BackupCleaner.java @@ -2,6 +2,7 @@ package fr.pandacube.lib.paper.modules.backup; import java.io.File; import java.time.LocalDateTime; +import java.time.format.DateTimeParseException; import java.util.Map.Entry; import java.util.Optional; import java.util.TreeMap; @@ -80,7 +81,13 @@ public abstract class BackupCleaner implements UnaryOperator, Ru static DateTimeFormatter dateFileNameFormatter = new DateTimeFormatterBuilder() - .append(DateTimeFormatter.BASIC_ISO_DATE) + .appendValue(ChronoField.YEAR, 4) + .appendValue(ChronoField.MONTH_OF_YEAR, 2) + .appendValue(ChronoField.DAY_OF_MONTH, 2) .appendLiteral('-') - .appendValue(ChronoField.HOUR_OF_DAY, 2) // there is no DateTimeFormatter.BASIC_ISO_TIME + .appendValue(ChronoField.HOUR_OF_DAY, 2) .appendValue(ChronoField.MINUTE_OF_HOUR, 2) .appendValue(ChronoField.SECOND_OF_MINUTE, 2) .toFormatter();