Paul Eggert wrote:
> > I agree that the majority of callers will use a time_t -> struct tm
> > conversion first. But if we want to recommend an 'asctime' and 'asctime_r'
> > replacement
> 
> We don't, because asctime is a bug magnet. Pretty much everybody who 
> calls asctime calls localtime (or a relative) first, and almost 
> everybody who does that neglects to check for localtime failure.

That's something we should mention in doc/posix-functions/asctime{,_r}.texi.
I would not have realized that e.g. the groff change [1] introduced a bug in
src/libs/libgroff/curtime.cpp.

Bruno

[1] 
https://git.savannah.gnu.org/gitweb/?p=groff.git;a=commitdiff;h=d7bbfb04ea25a82a8597cdef6ebb391cb78ab47c




Reply via email to