Skip to content

Commit e76ee65

Browse files
authored
Merge pull request #68 from BusanVibe/dev
fix: 명소 실시간 혼잡도 현재 시간을 중심으로 반환하도록 변경
2 parents d0aa1a8 + 6aab857 commit e76ee65

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/main/kotlin/busanVibe/busan/domain/place/service/PlaceCongestionQueryService.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class PlaceCongestionQueryService(
116116
val roundedBase = (current.hour / 3) * 3
117117

118118
// 최근 6개 3시간 단위 시간 생성 (기준시간 포함 총 7개)
119-
val hours = (6 downTo 0).map { i -> (roundedBase - i * 3 + 24) % 24 }
119+
val hours = (-3 .. 3).map { i -> (roundedBase - i * 3 + 24) % 24 }
120120

121121
val byTimePercent: List<Float> = hours.map { hour ->
122122
val adjustedDateTime = current.withHour(hour)

0 commit comments

Comments
 (0)