From 7b190108925df9f91827e1b2cb6b302d667eb87f Mon Sep 17 00:00:00 2001 From: wsczx Date: Sat, 22 Oct 2022 22:22:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=B8=8A=E4=BC=A0=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=9B=B8=E5=B7=AE8=E5=B0=8F=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/admin/uploaduser.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/admin/uploaduser.go b/server/admin/uploaduser.go index de8e511..4f904bf 100755 --- a/server/admin/uploaduser.go +++ b/server/admin/uploaduser.go @@ -37,13 +37,13 @@ func UploadUser(file string) error { if len(row[4]) < 6 { row[4] = utils.RandomRunes(8) } - limittime, _ := time.Parse("2006-01-02 15:04:05", row[5]) + limittime, _ := time.ParseInLocation("2006-01-02 15:04:05", row[5], time.Local) disableOtp, _ := strconv.ParseBool(row[7]) group := []string{row[8]} status := cast.ToInt8(row[9]) sendmail, _ := strconv.ParseBool(row[10]) - // createdAt, _ := time.Parse("2006-01-02 03:04:05", row[11]) - // updatedAt, _ := time.Parse("2006-01-02 03:04:05", row[12]) + // createdAt, _ := time.ParseInLocation("2006-01-02 15:04:05", row[11], time.Local) + // updatedAt, _ := time.ParseInLocation("2006-01-02 15:04:05", row[12], time.Local) user = &dbdata.User{ Id: id, Username: row[1],