News for hackers. Stuff that matters.
Re:Tell HN: C Experts Panel – Ask us anything about C by Tronic2 on Tuesday April 14, 2020 @10:06AM (#22866125)
Why is the struct tm* returned by localtime() not thread-local like errno and other similar variables are (at least in implementations)? Do you have any plans to improve calendar support for practical uses?
Re:Tell HN: C Experts Panel – Ask us anything about C by pascal_cuoq on Tuesday April 14, 2020 @12:15PM (#22867766)
Both question would get better answers if they were asked to a panel of experts on POSIX (which could including members of the POSIX standardization committee).

For the first one, I can attempt a guess: maybe it was feared that making the result of localtime thread-locale would break some programs? You could build such a program on purpose, although I am not clear how frequently one would write one by accident.

Anyway, localtime_r is the function that one should use if one is concerned by thread-safety. A more likely answer is that no Unix implementation bothered to fix localtime because the proper fix was for programs to call localtime_r.