libc: time: use the right length for a 400-year cycle in mktime
_time_mktime_tzi() splits tm_year into whole 400-year blocks and a
remainder, then multiplies the blocks by their length in days. A
Gregorian 400-year cycle is 146097 days; the constant said 146073, so
every complete block lost 24 days.
The first complete block is reached at tm_year 400, which is why nothing
before the year 2300 could see it:
mktime(2299-12-31) = 10413705600 correct
mktime(2300-01-01) = 10411718400 24 days short
mktime(2700-01-01) = 23032425600 48 days short, two blocks
Measured against glibc on i686 (UCLIBC_USE_TIME64) and x86_64; both were
identical, so this is not specific to the time64 layer. gmtime() and
localtime() were right all along, which makes mktime(gmtime(t)) != t.
Checked at every 400-year block boundary from 1970 to 3000, in both
directions through gmtime().
Signed-off-by: Ramin Moussavi <lordrasmus@gmail.com>