소스 검색

fix: 时区

hsun 1 개월 전
부모
커밋
c8d73ce343
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      controllers/report_open.go

+ 1 - 1
controllers/report_open.go

@@ -816,7 +816,7 @@ func (this *ReportOpenController) ReportKnowledgeUpload() {
 		br.ErrMsg = fmt.Sprintf("参数解析失败,%v", e)
 		return
 	}
-	pushTime, err := time.Parse(utils.FormatDateTime, req.PushTime)
+	pushTime, err := time.ParseInLocation(utils.FormatDateTime, req.PushTime, time.Local)
 	if err != nil {
 		br.Msg = "发布时间格式不正确"
 		return