]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
tm.3type: Add new page documenting 'struct tm'
authorAlejandro Colomar <alx.manpages@gmail.com>
Wed, 15 Jun 2022 19:53:29 +0000 (21:53 +0200)
committerAlejandro Colomar <alx.manpages@gmail.com>
Thu, 16 Jun 2022 16:19:02 +0000 (18:19 +0200)
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
man3/tm.3type [new file with mode: 0644]

diff --git a/man3/tm.3type b/man3/tm.3type
new file mode 100644 (file)
index 0000000..ad7c39e
--- /dev/null
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2022 by Alejandro Colomar <colomar.6.4.3@gmail.com>
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.\"
+.TH TM 3type 2022-06-15 Linux "Linux Programmer's Manual"
+.SH NAME
+tm \- broken-down time
+.SH LIBRARY
+Standard C library
+.RI ( libc )
+.SH SYNOPSIS
+.nf
+.B #include <time.h>
+.PP
+.B struct tm {
+.BR "    int  tm_sec;" "    /* Seconds [" 0 ", " 60 "] */"
+.BR "    int  tm_min;" "    /* Minutes [" 0 ", " 59 "] */"
+.BR "    int  tm_hour;" "   /* Hour [" 0 ", " 23 "] */"
+.BR "    int  tm_mday;" "   /* Day of the month [" 1 ", " 31 "] */"
+.BR "    int  tm_mon;" "    /* Month [" 0 ", " 11 "] (January = " 0 ") */"
+.BR "    int  tm_year;" "   /* Years since 1900 */"
+.BR "    int  tm_wday;" \
+"   /* Day of the week [" 0 ", " 6 "] (Sunday = " 0 ") */"
+.BR "    int  tm_yday;" \
+"   /* Day of the year [" 0 ", " 365 "] (Jan/01 = " 0 ") */"
+.BR "    int  tm_isdst;" "  /* Daylighgt savings flag */"
+.B };
+.fi
+.SH DESCRIPTION
+Describes time, broken down into distinct components.
+.PP
+.I tm_isdst
+describes wether daylight saving time is in effect at the time described.
+The value is positive if daylight saving time is in effect,
+zero if it is not,
+and negative if the information is not available.
+.SH VERSIONS
+In C90,
+.I tm_sec
+could represent values in the range
+.RB [ 0 ", " 61 ],
+which could represent a double leap second.
+UTC doesn't permit double leap seconds,
+so it was limited to
+.B 60
+in C99.
+.SH CONFORMING TO
+POSIX.1-2001 and later.
+C90 and later.
+.SH NOTES
+.I tm_sec
+can represent a leap second with the value
+.BR 60 .
+.SH SEE ALSO
+.BR ctime (3),
+.BR strftime (3),
+.BR strptime (3),
+.BR time (7)