summaryrefslogtreecommitdiffstats
path: root/man3/getdate.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/getdate.3')
-rw-r--r--man3/getdate.332
1 files changed, 19 insertions, 13 deletions
diff --git a/man3/getdate.3 b/man3/getdate.3
index 266202704..fefc37086 100644
--- a/man3/getdate.3
+++ b/man3/getdate.3
@@ -8,7 +8,7 @@
.\" Modified, 2001-12-26, aeb
.\" 2008-09-07, mtk, Various rewrites; added an example program.
.\"
-.TH getdate 3 2023-02-05 "Linux man-pages 6.03"
+.TH getdate 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getdate, getdate_r \- convert a date-plus-time string to broken-down time
.SH LIBRARY
@@ -180,30 +180,32 @@ Variables used by
.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 getdate ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:getdate env locale
T}
T{
+.na
+.nh
.BR getdate_r ()
T} Thread safety T{
+.na
+.nh
MT-Safe env locale
T}
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
The POSIX.1 specification for
.BR strptime (3)
contains conversion specifications using the
@@ -217,6 +219,10 @@ In glibc,
is implemented using
.BR strptime (3),
so that precisely the same conversions are supported by both.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH EXAMPLES
The program below calls
.BR getdate ()
@@ -276,21 +282,21 @@ Call 3 ("12:22:33") succeeded:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
-
+\&
int
main(int argc, char *argv[])
{
struct tm *tmp;
-
+\&
for (size_t j = 1; j < argc; j++) {
tmp = getdate(argv[j]);
-
+\&
if (tmp == NULL) {
printf("Call %zu failed; getdate_err = %d\en",
j, getdate_err);
continue;
}
-
+\&
printf("Call %zu (\e"%s\e") succeeded:\en", j, argv[j]);
printf(" tm_sec = %d\en", tmp\->tm_sec);
printf(" tm_min = %d\en", tmp\->tm_min);
@@ -302,7 +308,7 @@ main(int argc, char *argv[])
printf(" tm_yday = %d\en", tmp\->tm_yday);
printf(" tm_isdst = %d\en", tmp\->tm_isdst);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE