From b940925397865741d5ab15834a19bd04d8952eeb Mon Sep 17 00:00:00 2001 From: "guobin.1120" Date: Sun, 28 Apr 2024 17:52:27 +0800 Subject: [PATCH] fix: local time issue --- parse.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parse.go b/parse.go index 21726fd..d405c3a 100644 --- a/parse.go +++ b/parse.go @@ -51,10 +51,10 @@ func ParseYyyyMmDdHhMmSsSss(dStr string) (time.Time, error) { // ParseTimestampUnix return time.Time by parse timeUnix seconds. func ParseTimestampUnix(timeUnix int64) time.Time { - return time.Unix(timeUnix, 0) + return time.Unix(timeUnix, 0).Local() } // ParseTimestampUnixMilli return time.Time by parse timeUnixMilli milliseconds. func ParseTimestampUnixMilli(timeUnixMilli int64) time.Time { - return time.UnixMilli(timeUnixMilli) + return time.UnixMilli(timeUnixMilli).Local() }