Browse Source

fix-3319

pull/3451/head
liuzx 2 years ago
parent
commit
622e57da86
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      routers/api/v1/repo/cloudbrain_dashboard.go

+ 2
- 2
routers/api/v1/repo/cloudbrain_dashboard.go View File

@@ -729,14 +729,14 @@ func GetCloudbrainsDetailData(ctx *context.Context) {
beginTimeUnix = int64(recordBeginTime)
endTimeUnix = time.Now().Unix()
} else {
beginTime, err := time.ParseInLocation("2006-01-02", beginTimeStr, time.Local)
beginTime, err := time.ParseInLocation("2006-01-02T15:04:05", beginTimeStr, time.Local)
if err != nil {
log.Error("Can not ParseInLocation.", err)
ctx.Error(http.StatusBadRequest, ctx.Tr("ParseInLocation_get_error"))
return
}
beginTimeUnix = beginTime.Unix()
endTime, err := time.ParseInLocation("2006-01-02", endTimeStr, time.Local)
endTime, err := time.ParseInLocation("2006-01-02T15:04:05", endTimeStr, time.Local)
if err != nil {
log.Error("Can not ParseInLocation.", err)
ctx.Error(http.StatusBadRequest, ctx.Tr("ParseInLocation_get_error"))


Loading…
Cancel
Save