Browse Source

修改时间格式化

kobe6258 2 weeks ago
parent
commit
a7a942928a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      services/llm/chat_service.go

+ 1 - 1
services/llm/chat_service.go

@@ -129,7 +129,7 @@ func SaveChatRecordsToDB(chatId int) error {
 	var newRecords []*llm.UserChatRecord
 	for _, record := range list {
 		if record.Id == 0 {
-			sendTime, parseErr := time.Parse(utils.FormatDateTime, record.SendTime)
+			sendTime, parseErr := time.ParseInLocation(utils.FormatDateTime, record.SendTime, time.Local)
 			if parseErr != nil {
 				sendTime = time.Now()
 			}