diff --git a/utils/typeconv.go b/utils/typeconv.go index 24494d54..9d87b998 100644 --- a/utils/typeconv.go +++ b/utils/typeconv.go @@ -283,6 +283,10 @@ func Str2TimeWithDefault(timeStr string, defValue time.Time) time.Time { return retVal } +func IsTimeZero(timeValue time.Time) bool { + return timeValue == DefaultTimeValue || timeValue == ZeroTimeValue +} + func HTTPResponse2Json(response *http.Response) (map[string]interface{}, error) { var jsonResult map[string]interface{} bodyData, err := ioutil.ReadAll(response.Body)