Browse Source

fix: 时区

hsun 1 tháng trước cách đây
mục cha
commit
c8d73ce343
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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