1
This commit is contained in:
parent
f913e480a2
commit
d72fab5c83
12
sysutils.go
12
sysutils.go
@ -116,18 +116,18 @@ func IsNumberType(v interface{}) bool {
|
||||
}
|
||||
}
|
||||
|
||||
func FormatUnixDateTime(sec int64) string {
|
||||
strTime := time.Unix(sec, 0).Format("2006-01-02 15:04:05")
|
||||
func FormatUnixDateTime(sec int64, loc *time.Location) string {
|
||||
strTime := time.Unix(sec, 0).In(loc). Format("2006-01-02 15:04:05")
|
||||
return strTime
|
||||
}
|
||||
|
||||
func FormatUnixDate(sec int64) string {
|
||||
strTime := time.Unix(sec, 0).Format("2006-01-02")
|
||||
func FormatUnixDate(sec int64, loc *time.Location) string {
|
||||
strTime := time.Unix(sec, 0).In(loc).Format("2006-01-02")
|
||||
return strTime
|
||||
}
|
||||
|
||||
func FormatUnixDateEx(sec int64) string {
|
||||
strTime := time.Unix(sec, 0).Format("20060102")
|
||||
func FormatUnixDateEx(sec int64, loc *time.Location) string {
|
||||
strTime := time.Unix(sec, 0).In(loc).Format("20060102")
|
||||
return strTime
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user