Skip to content

Commit

Permalink
fix:time bug修复
Browse files Browse the repository at this point in the history
  • Loading branch information
WJPone committed Oct 18, 2024
1 parent 588c652 commit 884ed09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand All @@ -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)
}

Expand Down

0 comments on commit 884ed09

Please sign in to comment.