From 6c6e467e3a141161f31222b0a86a388eaee93a86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Sat, 21 Mar 2026 10:33:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E7=A9=BA=E6=97=B6=E9=97=B4=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- op_time/time.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/op_time/time.go b/op_time/time.go index cb4db16..bfa75ae 100644 --- a/op_time/time.go +++ b/op_time/time.go @@ -110,3 +110,7 @@ func (t *Time) getTimeFormat(defaultFormat string, layout ...string) string { func DefaultZeroTime() time.Time { return time.Date(1970, 1, 1, 0, 0, 0, 0, time.Local) } + +func IsZeroTime(t time.Time) bool { + return t.IsZero() || t.Year() == 1970 +}