Skip to content

Commit

Permalink
hotfix: 00시 인증 타임 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Shin-Jae-Yoon committed Dec 1, 2023
1 parent d608d04 commit b672371
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b672371

Please sign in to comment.