]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man3/ctime.3
Removed trailing white space at end of lines
[thirdparty/man-pages.git] / man3 / ctime.3
index f39ef0b0b374d8ecf82cf1f327016be33f6a6fdc..73e75d3010604f6237b5baf91c50e63ffd8a79e3 100644 (file)
@@ -32,7 +32,7 @@
 .\" Modified 2001-12-13, joey, aeb
 .\" Modified 2004-11-16, mtk
 .\"
-.TH CTIME 3 2016-12-12 "" "Linux Programmer's Manual"
+.TH CTIME 3 2019-03-06 "" "Linux Programmer's Manual"
 .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
@@ -41,19 +41,15 @@ localtime_r \- transform date and time to broken-down time or ASCII
 .B #include <time.h>
 .PP
 .BI "char *asctime(const struct tm *" tm );
-.br
 .BI "char *asctime_r(const struct tm *" tm ", char *" buf );
 .PP
 .BI "char *ctime(const time_t *" timep );
-.br
 .BI "char *ctime_r(const time_t *" timep ", char *" buf );
 .PP
 .BI "struct tm *gmtime(const time_t *" timep );
-.br
 .BI "struct tm *gmtime_r(const time_t *" timep ", struct tm *" result );
 .PP
 .BI "struct tm *localtime(const time_t *" timep );
-.br
 .BI "struct tm *localtime_r(const time_t *" timep ", struct tm *" result );
 .PP
 .BI "time_t mktime(struct tm *" tm );
@@ -95,21 +91,21 @@ separated into year, month, day, and so on.
 .PP
 Broken-down time is stored
 in the structure \fItm\fP, which is defined in \fI<time.h>\fP as follows:
-.sp
+.PP
 .in +4n
-.nf
+.EX
 struct tm {
-    int tm_sec;    /* Seconds (0-60) */
-    int tm_min;    /* Minutes (0-59) */
-    int tm_hour;   /* Hours (0-23) */
-    int tm_mday;   /* Day of the month (1-31) */
-    int tm_mon;    /* Month (0-11) */
-    int tm_year;   /* Year - 1900 */
-    int tm_wday;   /* Day of the week (0-6, Sunday = 0) */
-    int tm_yday;   /* Day in the year (0-365, 1 Jan = 0) */
+    int tm_sec;    /* Seconds (0\-60) */
+    int tm_min;    /* Minutes (0\-59) */
+    int tm_hour;   /* Hours (0\-23) */
+    int tm_mday;   /* Day of the month (1\-31) */
+    int tm_mon;    /* Month (0\-11) */
+    int tm_year;   /* Year \- 1900 */
+    int tm_wday;   /* Day of the week (0\-6, Sunday = 0) */
+    int tm_yday;   /* Day in the year (0\-365, 1 Jan = 0) */
     int tm_isdst;  /* Daylight saving time */
 };
-.fi
+.EE
 .in
 .PP
 The members of the \fItm\fP structure are:
@@ -152,11 +148,13 @@ is equivalent to
 .BI asctime(localtime( t )) \fR.
 It converts the calendar time \fIt\fP into a
 null-terminated string of the form
-.sp
-.RS
-"Wed Jun 30 21:49:08 1993\\n"
-.RE
-.sp
+.PP
+.in +4n
+.EX
+"Wed Jun 30 21:49:08 1993\en"
+.EE
+.in
+.PP
 The abbreviations for the days of the week are "Sun", "Mon", "Tue", "Wed",
 "Thu", "Fri", and "Sat".
 The abbreviations for the months are "Jan",
@@ -246,7 +244,7 @@ and a negative value means that
 .BR mktime ()
 should (use timezone information and system databases to)
 attempt to determine whether DST is in effect at the specified time.
-
+.PP
 The
 .BR mktime ()
 function modifies the fields of the
@@ -266,7 +264,7 @@ Calling
 .BR mktime ()
 also sets the external variable \fItzname\fP with
 information about the current timezone.
-
+.PP
 If the specified broken-down
 time cannot be represented as calendar time (seconds since the Epoch),
 .BR mktime ()
@@ -281,33 +279,33 @@ and
 .BR localtime ()
 return a pointer to a
 .IR "struct\ tm" .
-
+.PP
 On success,
 .BR gmtime_r ()
 and
 .BR localtime_r ()
 return the address of the structure pointed to by
 .IR result .
-
+.PP
 On success,
 .BR asctime ()
 and
 .BR ctime ()
 return a pointer to a string.
-
+.PP
 On success,
 .BR asctime_r ()
 and
 .BR ctime_r ()
 return a pointer to the string pointed to by
 .IR buf .
-
+.PP
 On success,
 .BR mktime ()
 returns the calendar time (seconds since the Epoch),
 expressed as a value of type
 .IR time_t .
-
+.PP
 On error,
 .BR mktime ()
 returns the value
@@ -388,7 +386,7 @@ The thread-safe versions,
 and
 .BR localtime_r (),
 are specified by SUSv2.
-
+.PP
 POSIX.1-2001 says:
 "The
 .BR asctime (),
@@ -402,26 +400,25 @@ 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.
-.LP
+.PP
 In many implementations, including glibc, a 0 in
 .I tm_mday
 is interpreted as meaning the last day of the preceding month.
-.LP
+.PP
 The glibc version of \fIstruct tm\fP has additional fields
-.sp
-.RS
-.nf
-long tm_gmtoff;           /* Seconds east of UTC */
+.PP
+.in +4n
+.EX
 const char *tm_zone;      /* Timezone abbreviation */
-.fi
-.RE
-.sp
+.EE
+.in
+.PP
 defined when
 .B _BSD_SOURCE
 was set before including
 .IR <time.h> .
 This is a BSD extension, present in 4.3BSD-Reno.
-
+.PP
 According to POSIX.1-2004,
 .BR localtime ()
 is required to behave as though