mirror of
https://gitee.com/johng/gf.git
synced 2024-12-04 05:07:44 +08:00
Package gview: build-in function 'date' supports printing current datetime.
This commit is contained in:
parent
83f5a9d34e
commit
7022486e93
@ -294,7 +294,8 @@ func (view *View) funcDate(format string, timestamp...interface{}) string {
|
||||
t := int64(0)
|
||||
if len(timestamp) > 0 {
|
||||
t = gconv.Int64(timestamp[0])
|
||||
} else {
|
||||
}
|
||||
if t == 0 {
|
||||
t = gtime.Millisecond()
|
||||
}
|
||||
return gtime.NewFromTimeStamp(t).Format(format)
|
||||
|
Loading…
Reference in New Issue
Block a user