diff --git a/src/main/java/org/winey/server/service/FeedService.java b/src/main/java/org/winey/server/service/FeedService.java index 54cbc99..fc1b127 100644 --- a/src/main/java/org/winey/server/service/FeedService.java +++ b/src/main/java/org/winey/server/service/FeedService.java @@ -266,6 +266,9 @@ private String getTimeAgo(LocalDateTime createdAt) { if (ChronoUnit.DAYS.between(now, createdAt) != 0) { return Math.abs(ChronoUnit.DAYS.between(now, createdAt)) + "일전"; } + if (ChronoUnit.HOURS.between(now, createdAt) != 0) { + return Math.abs(ChronoUnit.HOURS.between(now, createdAt)) + "시간전"; + } if (ChronoUnit.MINUTES.between(now, createdAt) != 0) { return Math.abs(ChronoUnit.MINUTES.between(now, createdAt)) + "분전"; } diff --git a/src/main/java/org/winey/server/service/NotiService.java b/src/main/java/org/winey/server/service/NotiService.java index 5b87fd4..8b119bb 100644 --- a/src/main/java/org/winey/server/service/NotiService.java +++ b/src/main/java/org/winey/server/service/NotiService.java @@ -101,6 +101,9 @@ private String getTimeAgo(LocalDateTime createdAt) { if (ChronoUnit.DAYS.between(now, createdAt) != 0) { return Math.abs(ChronoUnit.DAYS.between(now, createdAt)) + "일전"; } + if (ChronoUnit.HOURS.between(now, createdAt) != 0) { + return Math.abs(ChronoUnit.HOURS.between(now, createdAt)) + "시간전"; + } if (ChronoUnit.MINUTES.between(now, createdAt) != 0) { return Math.abs(ChronoUnit.MINUTES.between(now, createdAt)) + "분전"; }