|
@@ -15,6 +15,7 @@ import (
|
|
|
"os"
|
|
|
"path"
|
|
|
"strconv"
|
|
|
+ "strings"
|
|
|
"time"
|
|
|
)
|
|
|
|
|
@@ -158,7 +159,11 @@ func EditReport(reportInfo *models.Report, req models.EditReq, sysUser *system.A
|
|
|
//reportInfo.Content = html.EscapeString(req.Content) // 编辑不变更具体内容
|
|
|
//reportInfo.ContentSub = html.EscapeString(contentSub) // 编辑不变更具体内容
|
|
|
if req.CreateTime != `` {
|
|
|
- createTime, tmpErr := time.ParseInLocation(utils.FormatDateTime, req.CreateTime, time.Local)
|
|
|
+ formatDate := utils.FormatDateTime
|
|
|
+ if !strings.Contains(req.CreateTime, ":") {
|
|
|
+ formatDate = utils.FormatDate
|
|
|
+ }
|
|
|
+ createTime, tmpErr := time.ParseInLocation(formatDate, req.CreateTime, time.Local)
|
|
|
if tmpErr != nil {
|
|
|
err = tmpErr
|
|
|
return
|