[tz] Direct implementation of mktime_z

Robert Elz kre at munnari.OZ.AU
Tue Sep 27 15:22:50 UTC 2022

FWIW, the "indirect" implementation of mktime() (et.al.) wasn't for any
efficiency aims - in fact, IMO, any application for which the efficiency
of mktime() matters is probably doing something badly wrong, and the whole
method ought to be reconsidered.

Rather, I always considered it the right way for two reasons - it always
works (regardless of what type time_t happens to be - back then that was
even less settled than today ... dealing with unsigned time_t vs signed
sometimes causes issues), and second, it means all the various rules
(days/month, leap years, ....) need appear only in one place, rather than
in two.

The latter is what really swung it for me.


More information about the tz mailing list