NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/36528 (strptime(3) doesn't fill in the 'tm' structure fields correctly)
The following reply was made to PR lib/36528; it has been noted by GNATS.
From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: Robert Elz <kre%munnari.OZ.AU@localhost>
Subject: Re: lib/36528 (strptime(3) doesn't fill in the 'tm' structure fields
correctly)
Date: Sun, 14 May 2023 17:17:40 +0000
On Sun, May 14, 2023 at 08:00:03AM +0000, Robert Elz wrote:
> Note that this never was a bug. POSIX says:
>
> It is unspecified whether multiple calls to strptime( ) using the
> same tm structure will update the current contents of the structure
> or overwrite all contents of the structure. Conforming applications
> should make a single call to strptime( ) with a format and all data
> needed to completely specify the date and time being converted.
>
> That is, all strptime() is required to fill in in the struct tm are the
> fields actually specified by format characters. The implementation is
> allowed to alter the other fields, if it wants to. No neither the linux
> nor NetBSD implementations reported in the PR were incorrect, just the
> assumption made by the application used to test it.
I don't see how that's relevant to the example in this PR. The values
passed govern all the outputs that are printed.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index