Open source AI coding agent. Designed for large projects and real world tasks.
Go aiai-agentsai-developer-toolsai-toolsclicommand-linedeveloper-toolsgitgolanggpt-4llmopenaipolyglot-programmingterminalterminal-basedterminal-ui
update git log time formatting to display local time locally
Dane Schneider37677902e111
diff --git a/app/cli/cmd/log.go b/app/cli/cmd/log.goindex f1596916..4a45b27d 100644--- a/app/cli/cmd/log.go+++ b/app/cli/cmd/log.go@@ -56,8 +56,8 @@ func convertTimestampsToLocal(input string) (string, error) {t := time.Now()zone, _ := t.Zone()- parseFmt := "3:04:05pm UTC"- re := regexp.MustCompile(`\d{1,2}:\d{2}:\d{2}(am|pm) UTC`)+ parseFmt := "Mon Jan 2, 2006 | 3:04:05pm UTC"+ re := regexp.MustCompile(`\w{3} \w{3} \d{1,2}, \d{4} \| \d{1,2}:\d{2}:\d{2}(am|pm) UTC`)// Function to convert matched timestamps assuming they are in UTC to local time.replaceFunc := func(match string) string {diff --git a/app/server/db/git.go b/app/server/db/git.goindex 43a31fca..c616c09f 100644--- a/app/server/db/git.go+++ b/app/server/db/git.go@@ -228,8 +228,8 @@ func processGitHistoryOutput(raw string) [][2]string {continue // Skip entries with invalid timestamps.}- dt := time.Unix(timestamp, 0).Local()- formattedTs := dt.Format("3:04:05pm MST")+ dt := time.Unix(timestamp, 0).UTC()+ formattedTs := dt.Format("Mon Jan 2, 2006 | 3:04:05pm MST")// Prepare the header with colors.headerColor := color.New(color.FgCyan, color.Bold)