Skip to content

Commit

Permalink
fix UT
Browse files Browse the repository at this point in the history
  • Loading branch information
HTHou committed Sep 27, 2024
1 parent 7128a5f commit 6392555
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (f *Field) GetText() string {
case []byte:
return bytesToHexString(f.value.([]byte))
case time.Time:
return f.value.(time.Time).Format(time.DateOnly)
return f.value.(time.Time).Format("2006-01-02")
}
return ""
}
4 changes: 2 additions & 2 deletions client/rpcdataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (s *IoTDBRpcDataSet) getString(columnIndex int, dataType TSDataType) string
if err != nil {
return ""
}
return date.Format(time.DateOnly)
return date.Format("2006-01-02")
default:
return ""
}
Expand Down Expand Up @@ -380,7 +380,7 @@ func (s *IoTDBRpcDataSet) scan(dest ...interface{}) error {
if err != nil {
*t = ""
}
*t = date.Format(time.DateOnly)
*t = date.Format("2006-01-02")
default:
return fmt.Errorf("dest[%d] types must be *time.Time or *string", i)
}
Expand Down

0 comments on commit 6392555

Please sign in to comment.