Skip to content

Commit e63a3eb

Browse files
committed
update: time组件
1 parent cdae59f commit e63a3eb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

bootstrap/services/database/time.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,8 @@ func StrToTime(str string) Time {
7272
}
7373
return Time{tm}
7474
}
75+
76+
// UnixToTime 时间戳转时间类型
77+
func UnixToTime(unix int64) Time {
78+
return Time{time.Unix(unix, 0)}
79+
}

0 commit comments

Comments
 (0)