From 0d94361d3836a72de335b06f4fa36a89475ea58a Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Wed, 14 Dec 2022 19:05:24 +0100 Subject: [PATCH] Fix another Exception in Backup engine --- .../pandacube/lib/paper/modules/backup/CompressProcess.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/modules/backup/CompressProcess.java b/pandalib-paper/src/main/java/fr/pandacube/lib/paper/modules/backup/CompressProcess.java index ba5dd2f..c28b1d0 100644 --- a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/modules/backup/CompressProcess.java +++ b/pandalib-paper/src/main/java/fr/pandacube/lib/paper/modules/backup/CompressProcess.java @@ -14,6 +14,7 @@ import org.bukkit.ChatColor; import java.io.File; import java.text.DateFormat; +import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; import java.time.temporal.ChronoField; @@ -161,8 +162,7 @@ public abstract class CompressProcess implements Comparable, Ru private String getDateFileName() { - Calendar calendar = Calendar.getInstance(); - return dateFileNameFormatter.format(calendar.toInstant()); + return dateFileNameFormatter.format(ZonedDateTime.now()); }