<time.h> in C99

Antoine Leca Antoine.Leca at renault.fr
Wed Oct 27 15:53:30 UTC 1999


Markus Kuhn ha escrit:
> 
> I've just been told by someone from the British mirror of ISO/IEC JTC1/
> SC22/WG14 that C9X has now become C99 and that the new ISO C standard
> (DIS?) has been completed.

That is correct.  It is even rumored to be published; however, as
<URL:http://anubis.dkuug.dk/JTC1/SC22/open/n3050.htm> is not up to date,
the notice of publication (that should appear there) is still awaited.


> Did someone here look already into what finally happened to <time.h>?

Yes.
As you know, the problematic proposed changes were not accepted, and are removed
from (what is now) the International Standard.


As a result, there are two main differences with respect to C90
(a.k.a. ANSI C 89):
 - a number of stuff, coming from POSIX, have been added to the specifiers
to be used with strftime (and wcsftime);
 - the default values when in the "C" localization have been fixed (to follow
U.S. usage and default practice under Unix).

If we except wcsftime, I believe the current tzcode package is conforming with
the new standard, but I need to check that carefully (I still have to print
my copy of the Standard...)


With respect to the last publicly available draft (which should be available at
<URL:ftp://dkuug.dk/JTC1/SC22/WG14/www/docs/n869>), the differences are:

 - the default value when in the "C" localization have been aligned with POSIX;

 - the 3rd paragraph of mktime have been removed; in N869 it was wrongly
requiring mktime to return identical values on subsequent calls;
it was only a small point added by the mkxtime stuff, and it stayed
unnoticed (mainly my fault) when we dropped the problematic stuff.


Antoine



More information about the tz mailing list