From 884ed0985c72a493e185c225c6cc1fc018b66f40 Mon Sep 17 00:00:00 2001 From: WJPone <474790700@qq.com> Date: Fri, 18 Oct 2024 15:37:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:time=20bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/time.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/time.go b/lib/time.go index 66de901..e0b9a59 100644 --- a/lib/time.go +++ b/lib/time.go @@ -76,7 +76,7 @@ func TimeToFormat(t int, format string) string { //将当前时间转字符串 func TimeFormat(format string) string { - tm := time.Unix(TimeLong(), 0) + tm := time.Unix(TimeLong()/1000, 0) return tm.Format(format) } @@ -88,7 +88,7 @@ func UTCTime() string{ //将时间戳转字符串并格式化 func TimeLongToFormat(t int64, format string) string { - tm := time.Unix(t, 0) + tm := time.Unix(t/1000, 0) return tm.Format(format) }