Skip to content

Commit

Permalink
Merge pull request #20 from liuwenping/master
Browse files Browse the repository at this point in the history
minor: fix get time
  • Loading branch information
liuwenping authored Nov 4, 2021
2 parents 6d5262f + 61c1b45 commit c455d67
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions utils/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ import (

//GetDateTime: 获取系统当前时间
func GetDateTime() (localTime string, utcTime string, unixTime int64) {
t := time.Now()
localTime = t.Format(bkcommon.TimeFormat)
utcTime = t.UTC().Format(bkcommon.TimeFormat)
unixTime = t.Unix()
localTime = time.Now().Format(bkcommon.TimeFormat)
utcTime = time.Now().UTC().Format(bkcommon.TimeFormat)
unixTime = time.Now().Unix()
return
}

0 comments on commit c455d67

Please sign in to comment.