feat(user):完成用户部分所有接口的迁移。

This commit is contained in:
徐涛
2023-06-02 15:51:08 +08:00
parent cd723e98e3
commit 097e25f070
9 changed files with 447 additions and 68 deletions

View File

@@ -4,14 +4,18 @@ import (
"time"
)
var loc *time.Location = time.FixedZone("+0800", 8*60*60)
var Loc *time.Location = time.FixedZone("+0800", 8*60*60)
func Now() time.Time {
return time.Now().In(loc)
return time.Now().In(Loc)
}
func Time(year int, month time.Month, date, hours, min, sec, nsec int) time.Time {
return time.Date(year, month, date, hours, min, sec, nsec, Loc)
}
func Timestamp() int64 {
startline := time.Date(2022, 2, 22, 22, 22, 22, 0, loc).Unix()
startline := time.Date(2022, 2, 22, 22, 22, 22, 0, Loc).Unix()
return Now().Unix() - startline
}