diff --git a/src/main/java/com/kri/contact/server/service/ReserveService.java b/src/main/java/com/kri/contact/server/service/ReserveService.java index 09b5279..d4508a2 100644 --- a/src/main/java/com/kri/contact/server/service/ReserveService.java +++ b/src/main/java/com/kri/contact/server/service/ReserveService.java @@ -69,8 +69,14 @@ public class ReserveService { boolean requestPast, LocalDateTime now ) { - LocalDateTime startDt = requestPast ? now.minusMinutes(NOTIFICATION_RANGE_MINUTES) : now; - LocalDateTime endDt = now.plusMinutes(NOTIFICATION_RANGE_MINUTES); + LocalDateTime currentMinute = now.withSecond(0).withNano(0); + LocalDateTime startDt = requestPast + ? currentMinute.minusMinutes(NOTIFICATION_RANGE_MINUTES) + : currentMinute; + LocalDateTime endDt = currentMinute + .plusMinutes(NOTIFICATION_RANGE_MINUTES) + .withSecond(59) + .withNano(999_999_999); return toDtosWithProjectNames( listReserveRepository.findNotifications(userId, startDt, endDt) );