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: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: lib/36528 (strptime(3) doesn't fill in the 'tm' structure fields correctly)
Date: Sun, 14 May 2023 14:55:06 +0700

     Date:        Sat, 13 May 2023 18:19:54 +0000 (UTC)
     From:        dholland%NetBSD.org@localhost
     Message-ID:  <20230513181954.B299D1A923D%mollari.NetBSD.org@localhost>
 
   | Synopsis: strptime(3) doesn't fill in the 'tm' structure fields correctly
 
 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.
 
 kre
 


Home | Main Index | Thread Index | Old Index