Feb. 2, 2010
10:10 p.m.
It would be possible to make ctime() be
tm = localtime(t); if (tm == NULL) return NULL; return asctime(tm);
and in theory that would be adequate, but I'm actually going to suggest moving the fix into asctime() (into asctime_r() really of course), and have asctime_r() start
if (timeptr == NULL) return NULL;
I think that's a safer fix. Appended is the patch I suggest, made against the tzcode2009t sources (latest I believe.)
Any sentiment for (or against)... if (timeptr == NULL) return "?"; ...or... return "??? ??? ?? ??:??:?? ????\n"; ...or some variant? --ado