Skip to content

Commit

Permalink
fix: local time issue
Browse files Browse the repository at this point in the history
  • Loading branch information
guobinhit committed Apr 28, 2024
1 parent 292651b commit b940925
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

0 comments on commit b940925

Please sign in to comment.