asctime.c

Clive D.W. Feather clive at demon.net
Sun Aug 1 21:05:03 UTC 2004


Guy Harris said:
>>> The original asctime() specified exactly what the out buffer would
>>> contain.
>> Did it? How? That is, what did old manual pages actually say?
> If the FreeBSD man page repository is to be believed:
> 	http://www.freebsd.org/cgi/man.cgi? 
> query=ctime&manpath=Unix+Seventh+Edition&format=html
> 
> then it said:
> 
> 	   Ctime converts a time pointed to by clock such as returned  by   
> time(2)
>        into  ASCII  and returns a pointer to a 26-character string in  
> the fol-
>        lowing form.  All the fields have constant width.
> 
>            Sun Sep 16 01:03:52 1973\n\0

Right. I've also been pointed at other documents saying basically the same.

It looks like the people who turned that specification into C89 got it
slightly wrong. But I doubt it's going to get changed now.

It looks like the best we'll get is to have HISTORICAL and STANDARDIZED
versions, selected at compile time.

-- 
Clive D.W. Feather  | Work:  <clive at demon.net>   | Tel:    +44 20 8495 6138
Internet Expert     | Home:  <clive at davros.org>  | Fax:    +44 870 051 9937
Demon Internet      | WWW: http://www.davros.org | Mobile: +44 7973 377646
Thus plc            |                            |



More information about the tz mailing list