Skip to content

Commit

Permalink
[fix] 채소별 루틴 check 코드 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryeolee committed Jul 8, 2024
1 parent 7016691 commit 384acc0
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,17 @@ private static List<MyVeggieRoutine> checkRoutine(MyVeggie myVeggie){

private static Boolean signRoutineCheck(Date date){
boolean check = true;
String date1 = String.valueOf(date);
LocalDate currentDate = LocalDate.now();
LocalTime fixedTime = LocalTime.of(0, 0, 0, 0);
LocalDateTime dateTime = LocalDateTime.of(currentDate, fixedTime);
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S");
String formattedDateTime = dateTime.format(formatter);
if (date.equals(formattedDateTime)) {
if (date1.equals(formattedDateTime)) {
check = false;
}
log.info(String.valueOf(date));
log.info(String.valueOf(LocalDate.now()));
log.info(String.valueOf(date1));
log.info(String.valueOf(formattedDateTime));
return check;
}

Expand Down

0 comments on commit 384acc0

Please sign in to comment.