asctime() | clock() | ctime() | difftime() | gmtime() |
localtime() | mktime() | strftime() | strptime() | time() |
tzset()[1] |
[1] These functions are supported only in a POSIX program.
time_tv_sec; seconds
long tv_nsec; nanoseconds
The macro CLK_TCK, which is the number of clock ticks per second, is kept for historical reasons. It was used in connection with the return value of the clock() function. CLK_TCK has been withdrawn and is not supported as part of Single UNIX Specification, Version 3. New applications should use sysconf(_SC_CLK_TCK) instead of the CLK_TCK macro.
However, if it is necessary to continue using this symbol in an application written for Single UNIX Specification, Version 3, define the feature test macro _UNIX03_WITHDRAWN before including any standard system headers. The macro exposes all interfaces and symbols removed in Single UNIX Specification, Version 3.
Field | Description |
tm_sec | Seconds (0-60) |
tm_min | Minutes (0-59) |
tm_hour | Hours (0-23) |
tm_mday | Day of month (1-31) |
tm_mon | Month (0-11; January = 0) |
tm_year | Year (current year minus 1900) |
tm_wday | Day of week (0-6; Sunday = 0) |
tm_yday | Day of year (0-365; January 1 = 0) |
tm_isdst | Zero if Daylight Saving Time is not in effect; positive if Daylight Saving Time is in effect; negative if the information is not available. |
The time functions are affected by the current locale selected. The LC_CTYPE category affects the behavior of the strftime(), strptime(), and wcsftime() functions. The LC_TOD category affects the behavior of the gmtime(), mktime(), and localtime() functions.