From 425c0f1bab79bbf1e51e58ba09b987e8c9160991 Mon Sep 17 00:00:00 2001 From: adamdottv <2363879+adamdottv@users.noreply.github.com> Date: Mon, 12 May 2025 11:33:52 -0500 Subject: fix: timestamp formatting --- internal/tui/components/chat/message.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/tui/components/chat') diff --git a/internal/tui/components/chat/message.go b/internal/tui/components/chat/message.go index 225e4c003..4c747fe32 100644 --- a/internal/tui/components/chat/message.go +++ b/internal/tui/components/chat/message.go @@ -100,7 +100,7 @@ func renderUserMessage(msg message.Message, isFocused bool, width int, position // Add timestamp info info := []string{} - timestamp := time.Unix(msg.CreatedAt, 0).Format("15:04:05") + timestamp := time.UnixMilli(msg.CreatedAt).Local().Format("02 Jan 2006 03:04 PM") username, _ := config.GetUsername() info = append(info, baseStyle. Width(width-1). @@ -148,7 +148,7 @@ func renderAssistantMessage( baseStyle := styles.BaseStyle() // Always add timestamp info - timestamp := time.Unix(msg.CreatedAt, 0).Format("15:04:05") + timestamp := time.UnixMilli(msg.CreatedAt).Local().Format("02 Jan 2006 03:04 PM") modelName := "Assistant" if msg.Model != "" { modelName = models.SupportedModels[msg.Model].Name -- cgit v1.2.3