Document what happens when the format string contains insufficient
conversion specifications to completely specify the resulting struct tm. PR: 46331 Submitted by: Christian S.J. Peron MFC after: 2 weeks
This commit is contained in:
parent
bd82dc7460
commit
e4ceb70f7a
@ -71,6 +71,29 @@ and
|
||||
are now interpreted as beginning at 1969 per POSIX requirements.
|
||||
Years 69-00 are interpreted in the 20th century (1969-2000), years
|
||||
01-68 in the 21st century (2001-2068).
|
||||
.Pp
|
||||
If the
|
||||
.Fa format
|
||||
string does not contain enough conversion specifications to completely
|
||||
specify the resulting
|
||||
.Vt struct tm ,
|
||||
the unspecified members of
|
||||
.Va timeptr
|
||||
are left untouched.
|
||||
For example, if
|
||||
.Fa format
|
||||
is
|
||||
.Dq Ql "%H:%M:%S" ,
|
||||
only
|
||||
.Va tm_hour ,
|
||||
.Va tm_sec
|
||||
and
|
||||
.Va tm_min
|
||||
will be modified.
|
||||
If time relative to today is desired, initialize the
|
||||
.Fa timeptr
|
||||
structure with today's date before passing it to
|
||||
.Fn strptime .
|
||||
.Sh RETURN VALUES
|
||||
Upon successful completion,
|
||||
.Fn strptime
|
||||
|
Loading…
Reference in New Issue
Block a user