Olson, Arthur David (NIH/NCI)
olsona at dc37a.nci.nih.gov
Thu Jul 22 14:30:47 UTC 2004
Code in "asctime" such as...
y = timeptr->tm_year + (long) TM_YEAR_BASE;
if (y >= -999 && y <= 9999)
(void) sprintf(buf, "%.3s %.3s%3d %02d:%02d:%02d
else (void) sprintf(buf, "%.3s %.3s%3d %ld\n",
wn, mn, timeptr->tm_mday, y);
...never returns NULL and never (when applied to a "struct tm" derived from
a 64-bit time_t) overflows a 26-character buffer passed to asctime.
It does lose time-of-day information in the distant past and distant future.
More information about the tz