diff --git a/cmd/workout/get.go b/cmd/workout/get.go index a613d95..9fa5808 100644 --- a/cmd/workout/get.go +++ b/cmd/workout/get.go @@ -58,7 +58,7 @@ func runGet(cmd *cobra.Command, args []string) error { options[i] = prompt.SelectOption{ ID: w.ID, Title: w.Title, - Description: w.StartTime.Format("Jan 2, 2006") + " • " + fmt.Sprintf("%d exercises", len(w.Exercises)), + Description: w.StartTime.Local().Format("Jan 2, 2006") + " • " + fmt.Sprintf("%d exercises", len(w.Exercises)), } } return options, nil @@ -104,7 +104,7 @@ func runGet(cmd *cobra.Command, args []string) error { func printWorkoutDetails(w *api.Workout, cfg *config.Config, formatter output.Formatter) { fmt.Printf("Workout: %s\n", w.Title) fmt.Printf("ID: %s\n", w.ID) - fmt.Printf("Date: %s\n", w.StartTime.Format(cfg.Display.DateFormat+" "+cfg.Display.TimeFormat)) + fmt.Printf("Date: %s\n", w.StartTime.Local().Format(cfg.Display.DateFormat+" "+cfg.Display.TimeFormat)) fmt.Printf("Duration: %s\n", formatDuration(w.Duration())) if w.Description != "" { diff --git a/cmd/workout/list.go b/cmd/workout/list.go index 73d95f5..b7e003d 100644 --- a/cmd/workout/list.go +++ b/cmd/workout/list.go @@ -120,7 +120,7 @@ func runList(cmd *cobra.Command, args []string) error { for _, w := range allWorkouts { duration := formatDuration(w.Duration()) - date := w.StartTime.Format(cfg.Display.DateFormat) + date := w.StartTime.Local().Format(cfg.Display.DateFormat) table.AddRow( w.ID, truncateString(w.Title, 30),