buf - pointer to a struct tm object to store the result
1 2 3 4 5 6 7 8 9 10 11
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 */ };
Return value
1)
pointer to a static internal tm object on success
or null pointer otherwise. The structure may be shared between gmtime, localtime, and ctime and may be overwritten on each invocation.
2-3)
copy of the buf pointer
or null pointer on error (which may be a runtime constraint violation or a failure to convert the specified time to local calendar time)