Attached. I tried to make it as simple and musl-coding-style-compliant as possible. One line adds support for TZif3 (it costs nothing once we have TZif2 and we can ignore the extensions). The other changes are ifdef-guarded and can be ignored with -DNO_LEAPSECONDS, for hardcore POSIX fans. ;) But posix/ rules don't have leap seconds anyway, only right/ ones do: if you don't like #ifdef forests, feel free to remove the guards. By the way, what's the musl policy on internal sanity checks ? In __tz.c, musl doesn't check anything after the magic numbers, so if the zoneinfo file is bad later on, musl can crash, or worse, silently return inconsistent or wrong results. I understand that it's impossible to escalate an error to the user when the entry point returns a void, but wouldn't it be safer, in this case as well as in similar cases, to abort the program ? I tend to think that even raising a SIGSEGV manually would be better than silent undefined behaviour. I can also confirm that strftime() fails to null-terminate its output in some circumstances, most likely when the format string ends with a regular character instead of a conversion specifier. I'll submit a patch as soon as I have time to investigate more, unless you can fix it before I get to it. -- Laurent