The broken-down time structure \fItm\fP is defined in \fI<time.h>\fP
as follows:
.sp
-.RS
+.in +0.5i
.nf
-.ne 12
-.ta 8n 16n 32n
struct tm {
- int tm_sec; /* seconds */
- int tm_min; /* minutes */
- int tm_hour; /* hours */
- int tm_mday; /* day of the month */
- int tm_mon; /* month */
- int tm_year; /* year */
- int tm_wday; /* day of the week */
- int tm_yday; /* day in the year */
- int tm_isdst; /* daylight saving time */
+ int tm_sec; /* seconds */
+ int tm_min; /* minutes */
+ int tm_hour; /* hours */
+ int tm_mday; /* day of the month */
+ int tm_mon; /* month */
+ int tm_year; /* year */
+ int tm_wday; /* day of the week */
+ int tm_yday; /* day in the year */
+ int tm_isdst; /* daylight saving time */
};
-.ta
.fi
-.RE
+.in -0.5i
.SH "RETURN VALUE"
The return value of the function is a pointer to the first character
not processed in this function call. In case the input string
and \fBstrftime\fP().
.sp
.nf
-.ne 12
-.ta 8n 16n
#include <stdio.h>
#include <time.h>
int main() {
- struct tm tm;
- char buf[255];
+ struct tm tm;
+ char buf[255];
- strptime("2001-11-12 18:31:01", "%Y-%m-%d %H:%M:%S", &tm);
- strftime(buf, sizeof(buf), "%d %b %Y %H:%M", &tm);
- puts(buf);
- return 0;
+ strptime("2001-11-12 18:31:01", "%Y-%m-%d %H:%M:%S", &tm);
+ strftime(buf, sizeof(buf), "%d %b %Y %H:%M", &tm);
+ puts(buf);
+ return 0;
}
-.ta
.fi
.SH "GNU EXTENSIONS"
For reasons of symmetry, glibc tries to support for