mirror of https://github.com/mkerrisk/man-pages
ctime.3: ctime_r() and localtime_r() need not set 'timezone' and 'daylight'
The man page already noted that these functions need not set 'tzname', but things could be clearer: it tzset() is not called, then the other two variables also are not set. Also, clarify that ctime() does set 'timezone' and 'daylight'. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
e6068f213e
commit
546f67f3cd
|
@ -161,7 +161,8 @@ The abbreviations for the months are "Jan",
|
|||
The return value points to a statically allocated string which
|
||||
might be overwritten by subsequent calls to any of the date and time
|
||||
functions.
|
||||
The function also sets the external variable \fItzname\fP (see
|
||||
The function also sets the external
|
||||
variables \fItzname\fP, \fItimezone\fP, and \fIdaylight\fP (see
|
||||
.BR tzset (3))
|
||||
with information about the current timezone.
|
||||
The reentrant version
|
||||
|
@ -170,7 +171,7 @@ does the same, but stores the
|
|||
string in a user-supplied buffer
|
||||
which should have room for at least 26 bytes.
|
||||
It need not
|
||||
set \fItzname\fP.
|
||||
set \fItzname\fP, \fItimezone\fP, and \fIdaylight\fP.
|
||||
.PP
|
||||
The
|
||||
.BR gmtime ()
|
||||
|
@ -203,7 +204,7 @@ The
|
|||
.BR localtime_r ()
|
||||
function does the same, but stores the data in a
|
||||
user-supplied struct.
|
||||
It need not set \fItzname\fP.
|
||||
It need not set \fItzname\fP, \fItimezone\fP, and \fIdaylight\fP.
|
||||
.PP
|
||||
The
|
||||
.BR asctime ()
|
||||
|
|
Loading…
Reference in New Issue