From 3cf8762b96df7dff8685e554d5007821298e1a5e Mon Sep 17 00:00:00 2001 From: "WIN-JHFT4D3SIVT\\caoxiaozhu" Date: Mon, 6 Apr 2026 22:21:54 +0800 Subject: [PATCH] fix(frontend): change time format to 12-hour with AM/PM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change time locale from zh-CN to en-US to properly display AM/PM - Increase letter-spacing for better readability (0.08em → 0.12em) - Update all time displays to use 12-hour format consistently --- frontend/src/pages/chat/chatPage.css | 2 +- frontend/src/pages/chat/composables/useClientTime.ts | 2 +- frontend/src/pages/chat/index.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/chat/chatPage.css b/frontend/src/pages/chat/chatPage.css index 9afa256..33a29a9 100644 --- a/frontend/src/pages/chat/chatPage.css +++ b/frontend/src/pages/chat/chatPage.css @@ -2155,7 +2155,7 @@ .jarvis-time { font-family: var(--font-mono); font-size: 12px; - letter-spacing: 0.08em; + letter-spacing: 0.12em; color: rgba(224, 248, 255, 0.86); } diff --git a/frontend/src/pages/chat/composables/useClientTime.ts b/frontend/src/pages/chat/composables/useClientTime.ts index c35e5c1..673761d 100644 --- a/frontend/src/pages/chat/composables/useClientTime.ts +++ b/frontend/src/pages/chat/composables/useClientTime.ts @@ -36,7 +36,7 @@ export function useClientTime() { } function formatClientClock(date: Date) { - return date.toLocaleTimeString('zh-CN', { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit' }) + return date.toLocaleTimeString('en-US', { hour12: true, hour: '2-digit', minute: '2-digit', second: '2-digit' }) } function weatherCodeLabel(code: number | null | undefined) { diff --git a/frontend/src/pages/chat/index.vue b/frontend/src/pages/chat/index.vue index 02ced82..046f296 100644 --- a/frontend/src/pages/chat/index.vue +++ b/frontend/src/pages/chat/index.vue @@ -230,7 +230,7 @@ function renderMarkdown(content: string) {
{{ clientTime.toLocaleString('zh-CN', { month: 'long' }) }} {{ clientTime.getFullYear() }}
-
{{ clientTime.toLocaleTimeString('zh-CN', { hour12: false }) }}
+
{{ clientTime.toLocaleTimeString('en-US', { hour12: true }) }}