summaryrefslogtreecommitdiffstats
path: root/man3/ctime.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/ctime.3')
-rw-r--r--man3/ctime.3129
1 files changed, 87 insertions, 42 deletions
diff --git a/man3/ctime.3 b/man3/ctime.3
index 487264c7f..4dc72f270 100644
--- a/man3/ctime.3
+++ b/man3/ctime.3
@@ -13,7 +13,7 @@
.\" Modified 2001-12-13, joey, aeb
.\" Modified 2004-11-16, mtk
.\"
-.TH ctime 3 2023-02-05 "Linux man-pages 6.03"
+.TH ctime 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
asctime, ctime, gmtime, localtime, mktime, asctime_r, ctime_r, gmtime_r,
localtime_r \- transform date and time to broken-down time or ASCII
@@ -259,72 +259,134 @@ The result cannot be represented.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR asctime ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:asctime locale
T}
T{
+.na
+.nh
.BR asctime_r ()
T} Thread safety T{
+.na
+.nh
MT-Safe locale
T}
T{
+.na
+.nh
.BR ctime ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:tmbuf
race:asctime env locale
T}
T{
+.na
+.nh
.BR ctime_r (),
.BR gmtime_r (),
.BR localtime_r (),
.BR mktime ()
T} Thread safety T{
+.na
+.nh
MT-Safe env locale
T}
T{
+.na
+.nh
.BR gmtime (),
.BR localtime ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:tmbuf env locale
T}
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001.
-C99 specifies
-.BR asctime (),
-.BR ctime (),
-.BR gmtime (),
-.BR localtime (),
-and
-.BR mktime ().
-POSIX.1-2008 marks
-.BR asctime (),
-.BR asctime_r (),
-.BR ctime (),
-and
-.BR ctime_r ()
-as obsolete,
-recommending the use of
-.BR strftime (3)
-instead.
-.PP
+.SH VERSIONS
POSIX doesn't specify the parameters of
.BR ctime_r ()
to be
.IR restrict ;
that is specific to glibc.
+.PP
+In many implementations, including glibc, a 0 in
+.I tm_mday
+is interpreted as meaning the last day of the preceding month.
+.PP
+According to POSIX.1-2001,
+.BR localtime ()
+is required to behave as though
+.BR tzset (3)
+was called, while
+.BR localtime_r ()
+does not have this requirement.
+.\" See http://thread.gmane.org/gmane.comp.time.tz/2034/
+For portable code,
+.BR tzset (3)
+should be called before
+.BR localtime_r ().
+.SH STANDARDS
+.TP
+.BR asctime ()
+.TQ
+.BR ctime ()
+.TQ
+.BR gmtime ()
+.TQ
+.BR localtime ()
+.TQ
+.BR mktime ()
+C11, POSIX.1-2008.
+.TP
+.BR asctime_r ()
+.TQ
+.BR ctime_r ()
+.TQ
+.BR gmtime_r ()
+.TQ
+.BR localtime_r ()
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR gmtime ()
+.TQ
+.BR localtime ()
+.TQ
+.BR mktime ()
+C89, POSIX.1-2001.
+.TP
+.BR asctime ()
+.TQ
+.BR ctime ()
+C89, POSIX.1-2001.
+Marked obsolete in POSIX.1-2008 (recommending
+.BR strftime (3)).
+.TP
+.BR gmtime_r ()
+.TQ
+.BR localtime_r ()
+POSIX.1-2001.
+.TP
+.BR asctime_r ()
+.TQ
+.BR ctime_r ()
+POSIX.1-2001.
+Marked obsolete in POSIX.1-2008 (recommending
+.BR strftime (3)).
.SH NOTES
The four functions
.BR asctime (),
@@ -354,23 +416,6 @@ a broken-down time structure and an array of type
Execution of any of the functions may overwrite the information returned
in either of these objects by any of the other functions."
This can occur in the glibc implementation.
-.PP
-In many implementations, including glibc, a 0 in
-.I tm_mday
-is interpreted as meaning the last day of the preceding month.
-.PP
-According to POSIX.1-2001,
-.BR localtime ()
-is required to behave as though
-.BR tzset (3)
-was called, while
-.BR localtime_r ()
-does not have this requirement.
-.\" See http://thread.gmane.org/gmane.comp.time.tz/2034/
-For portable code,
-.BR tzset (3)
-should be called before
-.BR localtime_r ().
.SH SEE ALSO
.BR date (1),
.BR gettimeofday (2),