On 10/11/21 3:27 AM, Alejandro Colomar (man-pages) wrote:
timegm(3) says that you should "avoid their use" because timegm(3) is a Linux and BSD extension, but its use can NOT be avoided (well, it can, but if not done very carefully, you are likely to introduce bugs due to setenv(3) not being thread-safe), so I'd remove that sentence from timegm(3). I think it should be in POSIX.
No, NetBSD's mktime_z should be in POSIX, as it nicely generalizes both mktime and timegm.
mktime_z should also be in glibc, but that's another story....