Skip to content

Commit b0f5b73

Browse files
committed
fix: date
1 parent 7da7e0a commit b0f5b73

File tree

1 file changed

+7
-2
lines changed
  • tools-v2/pkg/cli/command/curvebs/list/dir

1 file changed

+7
-2
lines changed

tools-v2/pkg/cli/command/curvebs/list/dir/dir.go

+7-2
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,16 @@ func (pCmd *DirCommand) Init(cmd *cobra.Command, args []string) error {
100100
timeout := config.GetFlagDuration(pCmd.Cmd, config.RPCTIMEOUT)
101101
retrytimes := config.GetFlagInt32(pCmd.Cmd, config.RPCRETRYTIMES)
102102
fileName := config.GetBsFlagString(pCmd.Cmd, config.CURVEBS_DIR)
103-
userName := config.GetBsFlagString(pCmd.Cmd, config.CURVEBS_USER)
103+
owner := config.GetBsFlagString(pCmd.Cmd, config.CURVEBS_USER)
104+
date, errDat := cobrautil.GetTimeofDayUs()
105+
if errDat.TypeCode() != cmderror.CODE_SUCCESS {
106+
return errDat.ToError()
107+
}
104108
rpc := &ListDirRpc{
105109
Request: &nameserver2.ListDirRequest{
106110
FileName: &fileName,
107-
Owner: &userName,
111+
Owner: &owner,
112+
Date: &date,
108113
},
109114
Info: basecmd.NewRpc(mdsAddrs, timeout, retrytimes, "ListDir"),
110115
}

0 commit comments

Comments
 (0)