|TM(3)||Library Functions Manual||TM(3)|
tm — time
header defines the tm structure that contains calendar
dates and time broken down into components. The following
standards-compliant fields are present:
|int||tm_hour||Hours since midnight||[0, 23]|
|int||tm_mday||Day of the month||[1, 31]|
|int||tm_mon||Months since January||[0, 11]|
|int||tm_year||Years since 1900|
|int||tm_wday||Days since Sunday||[0, 6]|
|int||tm_yday||Days since January 1||[0, 365]|
|int||tm_isdt||Positive if daylight savings||>= 0|
In addition, the following NetBSD-specific fields are available:
|int||tm_gmtoff||Offset from UTC in seconds|
|__aconst char||tm_zone||Timezone abbreviation|
The tm_zone and tm_gmtoff fields exist, and are filled in by applicable library routines, only if arrangements to do so were made when the library containing these functions was created. There is no guarantee that these fields will continue to exist in this form in future releases of NetBSD.
The tm_gmtoff field denotes the offset (in seconds) of the time represented from UTC, with positive values indicating east of the Prime Meridian. The tm_zone field will become invalid and point to freed storage if the corresponding struct tm was returned by localtime_rz(3) and the const timezone_t tz argument has been freed by tzfree(3).
The tm structure conforms to IEEE Std 1003.1-2008 (“POSIX.1”) with respect to the described standard structure members.
|April 14, 2011||NetBSD-7.0.1|