feat: entgo
This commit is contained in:
2
tag.bat
2
tag.bat
@@ -1,4 +1,4 @@
|
||||
git tag v1.1.24
|
||||
git tag v1.1.25
|
||||
|
||||
git tag bank_card/v1.1.5
|
||||
git tag geoip/v1.1.5
|
||||
|
||||
@@ -33,10 +33,7 @@ func UnixMilliToStringPtr(milli *int64) *string {
|
||||
|
||||
tm := time.UnixMilli(*milli)
|
||||
|
||||
// 设置默认时区
|
||||
tm.In(GetDefaultTimeLocation())
|
||||
|
||||
str := tm.Format(TimeLayout)
|
||||
str := tm.In(GetDefaultTimeLocation()).Format(TimeLayout)
|
||||
return &str
|
||||
}
|
||||
|
||||
@@ -133,10 +130,7 @@ func TimeToTimeString(tm *time.Time) *string {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 设置默认时区
|
||||
tm.In(GetDefaultTimeLocation())
|
||||
|
||||
return trans.String(tm.Format(TimeLayout))
|
||||
return trans.String(tm.In(GetDefaultTimeLocation()).Format(TimeLayout))
|
||||
}
|
||||
|
||||
// StringDateToTime 字符串 -> 时间
|
||||
@@ -175,10 +169,7 @@ func TimeToDateString(tm *time.Time) *string {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 设置默认时区
|
||||
tm.In(GetDefaultTimeLocation())
|
||||
|
||||
return trans.String(tm.Format(DateLayout))
|
||||
return trans.String(tm.In(GetDefaultTimeLocation()).Format(DateLayout))
|
||||
}
|
||||
|
||||
// TimestamppbToTime timestamppb.Timestamp -> time.Time
|
||||
|
||||
Reference in New Issue
Block a user