Skip to content

Commit 1f23682

Browse files
committed
use unix ts for filename
1 parent 2ca2f4b commit 1f23682

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

cli/support.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"cdr.dev/slog"
1717
"cdr.dev/slog/sloggers/sloghuman"
1818
"github.com/coder/coder/v2/cli/clibase"
19-
"github.com/coder/coder/v2/coderd/util/tz"
2019
"github.com/coder/coder/v2/codersdk"
2120
"github.com/coder/coder/v2/support"
2221
)
@@ -74,12 +73,7 @@ func (r *RootCmd) support() *clibase.Cmd {
7473
if err != nil {
7574
return xerrors.Errorf("could not determine current working directory: %w", err)
7675
}
77-
loc, err := tz.TimezoneIANA()
78-
if err != nil {
79-
loc = time.UTC
80-
}
81-
tsStr := time.Now().In(loc).Format("2006-01-02-150405")
82-
fname := "coder-support-" + tsStr + ".zip"
76+
fname := fmt.Sprintf("coder-support-%d.zip", time.Now().Unix())
8377
outputPath = filepath.Join(cwd, fname)
8478
}
8579

@@ -101,7 +95,7 @@ func (r *RootCmd) support() *clibase.Cmd {
10195
Flag: "output",
10296
FlagShorthand: "o",
10397
Env: "CODER_SUPPORT_BUNDLE_OUTPUT",
104-
Description: "Path to which to output the generated support bundle. Defaults to coder-support-YYYYmmdd-HHMMSS.zip.",
98+
Description: "File path for writing the generated support bundle. Defaults to coder-support-$(date +%s).zip.",
10599
Value: clibase.StringOf(&outputPath),
106100
},
107101
}

0 commit comments

Comments
 (0)