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 22:11:41 +0000

 On Mon, May 15, 2023 at 01:59:50AM +0700, Robert Elz wrote:
  >     Date:        Sun, 14 May 2023 17:17:40 +0000
  >     From:        David Holland <dholland-bugs%netbsd.org@localhost>
  >     Message-ID:  <ZGEXtDniLI8JsFSD%netbsd.org@localhost>
  > 
  >   | I don't see how that's relevant to the example in this PR. The values
  >   | passed govern all the outputs that are printed.
  > 
  > You mean they could, but that's not how strptime() is defined to work.
  >
  > [...]
  >
  > 	If a match is found,
  > 	values for the appropriate tm structure members are set to values
  > 	corresponding to the locale information.
 
 This is _all_ it says; it doesn't define what is appropriate, or
 attach specific fields to specific conversions. As we know from the
 previous related long wrangle, they have done that in other cases and
 therefore (by the rules of standards interpretation) we can conclude
 that they intended to leave it vague.
 
 Consequently, there's a reasonably strong argument that setting
 tm_wday is appropriate if enough information has been provided to
 compute it. Furthermore, even if it is not _required_ it is clearly
 _permitted_ and also desirable.
 
 In any event it's a moot point.
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index