For portable code, tzset(3) should be called before localtime_r(). SEE ALSO date(1), gettimeofday(2), time(2), utime(2), clock(3), difftime(3), strftime(3), strptime(3), timegm(3), tzset(3), time(7) COLOPHON This page is part of release 5.05 of the Linux man-pages ...
This is a BSD extension, present in 4.3BSD-Reno. According to POSIX.1-2004, localtime() is required to behave as though tzset(3) was called, while localtime_r() does not have this requirement. For portable code tzset(3) should be called before localtime_r(). ...