From bfb92b025a09030d579107f35180c9ca524490d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20Y=C4=B1ld=C4=B1r=C4=B1m?= Date: Wed, 22 Oct 2025 16:46:55 +0300 Subject: [PATCH] Fix interval check for 2y case in gtime.go Since 3628800000 ms is equal to 42 days any range longer than that falls to the default case which is 1 year. I updated the condition to 63072000000 ms which is 2 years. --- backend/gtime/gtime.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/gtime/gtime.go b/backend/gtime/gtime.go index d2a30d9a8..07c07e941 100644 --- a/backend/gtime/gtime.go +++ b/backend/gtime/gtime.go @@ -313,7 +313,7 @@ func RoundInterval(interval time.Duration) time.Duration { case interval <= 1814400000*time.Millisecond: return time.Millisecond * 604800000 // 1w // 2y - case interval < 3628800000*time.Millisecond: + case interval < 63072000000*time.Millisecond: return time.Millisecond * 2592000000 // 30d default: return time.Millisecond * 31536000000 // 1y