时间由指针改回对象

This commit is contained in:
hoteas
2022-10-20 09:08:23 +08:00
parent 56f4911459
commit ea932a032b
7 changed files with 883 additions and 880 deletions
+2 -2
View File
@@ -38,8 +38,8 @@ func StrFirstToUpper(str string) string {
}
// 时间转字符串,第二个参数支持1-5对应显示年月日时分秒
func Time2Str(t *time.Time, qu ...interface{}) string {
if t == nil || t.Unix() < 0 {
func Time2Str(t time.Time, qu ...interface{}) string {
if t.Unix() < 0 {
return ""
}
tp := 5