Skip to content

Commit

Permalink
fix: update time format
Browse files Browse the repository at this point in the history
  • Loading branch information
Equationzhao committed Feb 25, 2025
1 parent c1daa99 commit b27b96b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/cli/g.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var (
noOutputFunc = make([]contents.NoOutputOption, 0)
r = render.NewRenderer(&theme.DefaultAll)
p = display.NewFitTerminal()
timeFormat = "Jan 06 15:04"
timeFormat = "Jan 02 15:04"
// ReturnCode - Exit status:
// 0 if OK,
// 1 if minor problems (e.g., cannot access subdirectory),
Expand Down
4 changes: 2 additions & 2 deletions internal/cli/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ var viewFlag = []cli.Flag{
Usage: `time/date format with -l,
valid timestamp styles are default, iso, long-iso, full-iso, locale,
custom +FORMAT like date(1).
(default: +%d.%b'%y %H:%M ,like 02.Jan'06 15:04)`,
(default: +%b %d %H:%M ,like Jan 02 15:04)`,
EnvVars: []string{"TIME_STYLE"},
Action: func(context *cli.Context, s string) error {
_ = context.Set("time", "1")
Expand All @@ -194,7 +194,7 @@ var viewFlag = []cli.Flag{
case "iso":
timeFormat = "01-02 15:04"
case "default":
timeFormat = "02.Jan'06 15:04"
timeFormat = "Jan 02 15:04"
default:
ReturnCode = 2
return errors.New("invalid time-style")
Expand Down

0 comments on commit b27b96b

Please sign in to comment.