Roc 3 viikkoa sitten
vanhempi
commit
4ed8489e9f
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  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
 }