From 67cb3070d67b97c66854f91d22979231477e1ccc Mon Sep 17 00:00:00 2001 From: Andrew Nitu Date: Fri, 14 Aug 2026 12:01:58 -0400 Subject: [PATCH] fix --- cmd/lk/agent.go | 2 +- cmd/lk/utils.go | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cmd/lk/agent.go b/cmd/lk/agent.go index fbca6857f..8adcabc1b 100644 --- a/cmd/lk/agent.go +++ b/cmd/lk/agent.go @@ -1568,7 +1568,7 @@ func listAgents(ctx context.Context, cmd *cli.Command) error { strings.Join(regions, ","), strings.Join(deployments, ","), agent.Version, - formatTime(agent.DeployedAt.AsTime()), + formatDeployedAt(agent.DeployedAt.AsTime()), }) } diff --git a/cmd/lk/utils.go b/cmd/lk/utils.go index 378fdf414..34d491910 100644 --- a/cmd/lk/utils.go +++ b/cmd/lk/utils.go @@ -495,3 +495,10 @@ func formatTime(t time.Time) string { } return t.Format(time.RFC3339) } + +func formatDeployedAt(t time.Time) string { + if t.IsZero() { + return "never deployed" + } + return t.Format(time.RFC3339) +}