From b5be9977e5daa39a3f36259eba4c6edee9757cb7 Mon Sep 17 00:00:00 2001 From: kirillk Date: Mon, 18 May 2026 20:46:07 -0400 Subject: [PATCH] test(jetbrains): stabilize history timezone assertions --- .../kilocode/client/session/history/HistoryControllerTest.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/history/HistoryControllerTest.kt b/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/history/HistoryControllerTest.kt index 7cddaef3a4d..74fab599b59 100644 --- a/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/history/HistoryControllerTest.kt +++ b/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/history/HistoryControllerTest.kt @@ -26,6 +26,8 @@ import kotlinx.coroutines.runBlocking import java.awt.Cursor import java.awt.event.KeyEvent import java.time.Instant +import java.time.LocalDate +import java.time.ZoneId import java.time.temporal.ChronoUnit import java.util.concurrent.atomic.AtomicInteger import javax.swing.JComponent @@ -282,7 +284,7 @@ class HistoryControllerTest : BasePlatformTestCase() { } fun `test cloud history uses relative time and sections`() { - val now = Instant.now() + val now = LocalDate.of(2026, 5, 18).atTime(12, 0).atZone(ZoneId.systemDefault()).toInstant() val today = CloudHistoryItem(cloud("cloud_today", "Today", now.minus(5, ChronoUnit.HOURS))) val yesterday = CloudHistoryItem(cloud("cloud_yesterday", "Yesterday", now.minus(1, ChronoUnit.DAYS))) val offset = CloudHistoryItem(