陈少旭 před 9 měsíci
rodič
revize
ab2e800edd
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 4 4
      controllers/his_api_controller.go

+ 4 - 4
controllers/his_api_controller.go Zobrazit soubor

3241
 					timeLayout := "2006-01-02"
3241
 					timeLayout := "2006-01-02"
3242
 					loc, _ := time.LoadLocation("Local")
3242
 					loc, _ := time.LoadLocation("Local")
3243
 					theTime2, err := time.ParseInLocation(timeLayout+" 15:04", preTime, loc)
3243
 					theTime2, err := time.ParseInLocation(timeLayout+" 15:04", preTime, loc)
3244
-					result := strings.Split(preTime, " ")
3245
-					theTime3, _ := time.ParseInLocation(timeLayout, result[0], loc)
3244
+					//result := strings.Split(preTime, " ")
3245
+					theTime3, _ := time.ParseInLocation(timeLayout, record_date, loc)
3246
 					if err != nil {
3246
 					if err != nil {
3247
 						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
3247
 						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
3248
 						return
3248
 						return
4421
 					timeLayout := "2006-01-02"
4421
 					timeLayout := "2006-01-02"
4422
 					loc, _ := time.LoadLocation("Local")
4422
 					loc, _ := time.LoadLocation("Local")
4423
 					theTime2, err := time.ParseInLocation(timeLayout+" 15:04", preTime, loc)
4423
 					theTime2, err := time.ParseInLocation(timeLayout+" 15:04", preTime, loc)
4424
-					result := strings.Split(preTime, " ")
4425
-					theTime3, _ := time.ParseInLocation(timeLayout, result[0], loc)
4424
+					//result := strings.Split(preTime, " ")
4425
+					theTime3, _ := time.ParseInLocation(timeLayout, record_date, loc)
4426
 					if err != nil {
4426
 					if err != nil {
4427
 						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
4427
 						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
4428
 						return
4428
 						return