Path: csiph.com!news.swapon.de!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.std.c
Subject: Re: C23: asctime is obsolescent
Date: Mon, 02 Jan 2023 08:20:37 -0800
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <86wn64q562.fsf@linuxsc.com>
References: <875yf5ksn9.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader01.eternal-september.org; posting-host="60a7a09099a9247382aee0cc66dfd4bb"; logging-data="1933247"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+GwqE/TR4dXj7GFI9JuFQe+Xp7DcW68sk="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:+4XY0EfEak8Fv5whe4EQqTYkmJk= sha1:kynS2M3i0BXKXhkz5s/D/Z7vXDU=
Xref: csiph.com comp.std.c:6462
Keith Thompson writes:
> In the latest C23 draft:
> https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3047.pdf
> the descriptions of the __DATE__ and __TIME__ macros refer to the
> asctime() function.
>
> That's not new. What's new is that asctime() is deprecated.
>
> Referring to a deprecated function isn't really a problem, but if
> asctime() is actually removed in a future standard the descriptions of
> __DATE__ and __TIME__ will need to be updated.
>
> It would also be nice to have a new macro that expands to the current
> date in the form "YYYY-MM-DD". I do not suggest changing the behavior
> of __DATE__, but perhaps something like __ISODATE__ could be added.
> Question: If this is done, should __DATE__ be deprecated?
Also it seems ill advised to designate asctime() as either
obsolescent or deprecated.