Roc 3 weeks ago
parent
commit
4ed8489e9f
1 changed files with 5 additions and 1 deletions
  1. 5 1
      utils/common.go

+ 5 - 1
utils/common.go

@@ -1825,9 +1825,13 @@ func GetDateByDateTypeV2(dateType int, tmpStartDate, tmpEndDate string, startYea
 
 func TimeTransferString(format string, t time.Time) string {
 	str := t.Format(format)
-	if t.IsZero() || t.UTC().IsZero() {
+	if t.IsZero() {
+		return ""
+	}
+	if strings.Contains(str, "0001-01-01") {
 		return ""
 	}
+
 	return str
 }