test #339
|
@ -19,6 +19,7 @@ object RankingWindowCalculator {
|
||||||
private val ZONE: ZoneId = ZoneOffset.UTC
|
private val ZONE: ZoneId = ZoneOffset.UTC
|
||||||
private const val BOUNDARY_HOUR = 20 // 20:00:00 UTC
|
private const val BOUNDARY_HOUR = 20 // 20:00:00 UTC
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
fun now(prefix: String = "popular-chat-character"): RankingWindow {
|
fun now(prefix: String = "popular-chat-character"): RankingWindow {
|
||||||
val now = ZonedDateTime.now(ZONE)
|
val now = ZonedDateTime.now(ZONE)
|
||||||
val todayBoundary = now.toLocalDate().atTime(BOUNDARY_HOUR, 0, 0).atZone(ZONE)
|
val todayBoundary = now.toLocalDate().atTime(BOUNDARY_HOUR, 0, 0).atZone(ZONE)
|
||||||
|
|
Loading…
Reference in New Issue