The <time.h> header declares the structure tm, which includes the following members:
int tm_sec seconds [0,61]
int tm_min minutes [0,59]
int tm_hour hour [0,23]
int tm_mday day of month [1,31]
int tm_mon month of year [0,11]
int tm_year years since 1900
int tm_wday day of week [0,6] (Sunday = 0)
int tm_yday day of year [0,365]
int tm_isdst daylight savings flag
The value of tm_isdst is positive if Daylight Saving Time is in effect, 0 if Daylight Saving Time is not in effect, and negative if the information is not available.
This header defines the following symbolic names:
- Null pointer constant.
- Number of clock ticks per second returned by the times(2) function.
- A number used to convert the value returned by the clock(3C) function into seconds.
The <time.h> header declares the structure timespec, which has the following members:
time_t tv_sec seconds
long tv_nsec nanoseconds
This header also declares the itimerspec structure, which has at least the following members:
struct timespec it_interval timer period
struct timespec it_value timer expiration
The following manifest constants are defined:
- The identifier of the systemwide realtime clock.
- Flag indicating time is absolute with respect to the clock associated with a timer.
The clock_t, size_t and time_t types are defined as described in <sys/types.h>.
Although the value of CLOCKS_PER_SEC is 1 million on all Solaris systems, it may be variable on other systems and it should not be assumed that CLOCKS_PER_SEC is a compile-time constant.
The value of CLK_TCK is currently the same as the value of sysconf(_SC_CLK_TCK); however, new applications should call sysconf(3C) because the CLK_TCK macro may be withdrawn
in a future issue.
The <time.h> header provides a declaration for getdate_err.
The following are declared as variables:
extern int daylight;
extern long int timezone;
extern char *tzname;