May 11, 1994
7:35 p.m.
! /* ! ** The following is equivalent to `return asctime(localtime(timep));', ! ** except it does not modify localtime's static storage, ! ** and thus it works around all-too-common bugs like ! ** `struct tm *p = localtime(&t1); puts(ctime(&t2)); return p->tm_year'. ! */
Hmmm...given the X3J11 description of ctime in section 4.12.3.2... The ctime funciton converts the calendar time pointed to by timer to local time in the form of a string. It is equivalent to asctime(localtime(timer)) ...do we open ourselves up to standard conformance challenges if ctime is anything except "asctime(localtime(timer))"? --ado