[tz] why does mktime binary search?
scs at eskimo.com
Fri Jul 29 23:37:06 UTC 2016
> is there a more detailed explanation of why mktime does binary search?
Russ Allbery answered the errno question, but as for the binary search:
mktime is *really* *hard* to write, correctly, otherwise. Besides being
considerably easier to implement, the binary search implementation
effectively ensures that mktime is a perfect inverse of localtime,
because it (literally) takes the localtime function and inverts it.
More information about the tz