3 ms·
Go's zero time is not at 1970. It's at year 1. // IsZero reports whether t represents the zero time instant, // January 1, year 1, 00:00:00 UTC. f
by jrockway 5y ago
Go's zero time is not at 1970. It's at year 1.
// IsZero reports whether t represents the zero time instant,
// January 1, year 1, 00:00:00 UTC.
func (t Time) IsZero() bool {
return t.sec() == 0 && t.nsec() == 0
}