[tz] mktime() clarification
brian.inglis at systematicsw.ab.ca
brian.inglis at systematicsw.ab.ca
Tue Mar 26 03:52:45 UTC 2024
On 2024-03-25 19:53, Dag-Erling Smørgrav wrote:
> "brian.inglis--- via tz" <tz at iana.org> writes:
>> It would be more informative to state the platform and compiler you
>> used, show the results you got, and explain what you think it means.
>
> I didn't expect my audience to be wilfully obtuse. As I've already
> stated and emphasized, POSIX does not guarantee or require that errno is
> not modified by a successful call. Given the input from my example,
> tzcode will set errno to EOVERFLOW before returning successfully.
So you are running tzcode mktime on some unspecified platform, compiler, and
library, and that implementation happens to return that result, unless it
happens that implementation's printf set errno to EOVERFLOW, before printing it.
Other platforms, libraries, and mktime implementations may produce different
results: one platform I tested set errno = 2 ENOENT as posixrules is not
installed, but time_t was as expected.
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry
More information about the tz
mailing list