Unix time is *not* the number of seconds since 1 January 1970.
No, it’s not because of leap seconds, although that’s part of it.
It’s because from 1970 to 1972, there were two different definitions of a second. UTC seconds were longer than SI seconds.
Unix time is actually the number of seconds since 1972, plus 6,307,200 seconds, minus leap seconds.
If you subtract those 6,307,200 seconds, you do not get exactly back to what people in 1970 called midnight 1 January.