diff --git a/src/main/kotlin/org/gitanimals/render/domain/UserStatisticService.kt b/src/main/kotlin/org/gitanimals/render/domain/UserStatisticService.kt index d810762..a745ef5 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/UserStatisticService.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/UserStatisticService.kt @@ -10,9 +10,9 @@ class UserStatisticService( ) { fun getYesterdayUserCount(): Int { - val current = LocalDate.now() - val startDay = current.atTime(0, 0, 0).toInstant(ZoneOffset.UTC) - val endDay = current.atTime(23, 59, 59).toInstant(ZoneOffset.UTC) + val yesterday = LocalDate.now().minusDays(1) + val startDay = yesterday.atTime(0, 0, 0).toInstant(ZoneOffset.UTC) + val endDay = yesterday.atTime(23, 59, 59).toInstant(ZoneOffset.UTC) return userStatisticRepository.getDailyUserCount(startDay, endDay) }