From b6723719082d85db24698595e045b9860889685c Mon Sep 17 00:00:00 2001 From: Dev Uni Date: Sat, 2 Dec 2023 00:21:00 +0900 Subject: [PATCH] =?UTF-8?q?hotfix:=2000=EC=8B=9C=20=EC=9D=B8=EC=A6=9D=20?= =?UTF-8?q?=ED=83=80=EC=9E=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/moabam/api/application/room/CertificationService.java | 3 ++- .../java/com/moabam/global/common/util/GlobalConstant.java | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/moabam/api/application/room/CertificationService.java b/src/main/java/com/moabam/api/application/room/CertificationService.java index e6a56ab3..94f49a73 100644 --- a/src/main/java/com/moabam/api/application/room/CertificationService.java +++ b/src/main/java/com/moabam/api/application/room/CertificationService.java @@ -111,7 +111,8 @@ public Certification findCertification(Long certificationId) { private void validateCertifyTime(LocalDateTime now, int certifyTime) { LocalTime targetTime = LocalTime.of(certifyTime, 0); LocalDateTime targetDateTime = LocalDateTime.of(now.toLocalDate(), targetTime); - if (certifyTime == MIDNIGHT_HOUR) { + + if (certifyTime == MIDNIGHT_HOUR && now.getHour() == ONE_HOUR_BEFORE_MIDNIGHT_HOUR) { targetDateTime = targetDateTime.plusDays(1); } diff --git a/src/main/java/com/moabam/global/common/util/GlobalConstant.java b/src/main/java/com/moabam/global/common/util/GlobalConstant.java index 7b62d447..c4d6ce53 100644 --- a/src/main/java/com/moabam/global/common/util/GlobalConstant.java +++ b/src/main/java/com/moabam/global/common/util/GlobalConstant.java @@ -11,6 +11,7 @@ public class GlobalConstant { public static final String CHARSET_UTF_8 = ";charset=UTF-8"; public static final String SPACE = " "; public static final int MIDNIGHT_HOUR = 0; + public static final int ONE_HOUR_BEFORE_MIDNIGHT_HOUR = 23; public static final int ONE_HOUR = 1; public static final int HOURS_IN_A_DAY = 24; public static final int NOT_COMPLETED_RANK = 500;