bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Let's remove Gnulib's ctime module


From: Paul Eggert
Subject: Re: Let's remove Gnulib's ctime module
Date: Fri, 9 Feb 2024 01:00:39 -0800
User-agent: Mozilla Thunderbird

On 2024-02-09 00:39, Simon Josefsson wrote:
How about this (or gl-ctime?):

    The
    function does not set the external variables tzname, timezone or
    daylight, see tzset(3).

I don't see how to implement that. We gotta call localtime or localtime_r and they can set those variables.

Anyway, nobody should care about those variables nowadays. See:

https://data.iana.org/time-zones/theory.html#vestigial


    The string length may be shorter for
    years before 1000 and larger for years after 9999.

The length can also be longer for years before -999.

    If WHEN cannot
    be converted into a string,

If we're going to this much work, let's always convert WHEN to a string, and never fail. This will simplify the caller, which is the point of this API.


   The function's Thread
    safety attribute value is MT-Safe env locale.

The function is locale-independent, so why say "locale" here?

When you write this sort of thing, do you mean the properties must be guaranteed on all platforms, or just on glibc?

Not sure it's worth the hassle of thinking out and documenting this stuff portably. Too much depends on the underlying implementation.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]