fix Date & Datetime

tags/v1.4.1 v1.4.1
Stanly 3 years ago
parent e832a78b72
commit 8caad09446

@ -50,6 +50,9 @@ func (t Timestamp) Time() time.Time {
// Date 回傳日期字串
func (t Timestamp) Date() string {
if t == 0 {
return ""
}
return time.
Unix(t.Int64(), 0).
In(Local).
@ -58,6 +61,9 @@ func (t Timestamp) Date() string {
// Datetime 回傳時間字串
func (t Timestamp) Datetime() string {
if t == 0 {
return ""
}
return time.
Unix(t.Int64(), 0).
In(Local).

Loading…
Cancel
Save