| Functions | ||||
| Time manipulation | ||||
(C11) | ||||
(C23) | ||||
| Format conversions | ||||
(deprecated in C23)(C11) | ||||
(deprecated in C23)(C11) | ||||
(C95) | ||||
(C23)(C11) | ||||
(C23)(C11) | ||||
| Constants | ||||
| Types | ||||
tm | ||||
(C11) |
Defined in header <time.h> | ||
struct tm; | ||
Structure holding a calendar date and time broken down into its components.
Contents |
int tm_sec | seconds after the minute –[0, 61](until C99)[0, 60](since C99)[note 1](public member object) |
int tm_min | minutes after the hour –[0, 59](public member object) |
int tm_hour | hours since midnight –[0, 23](public member object) |
int tm_mday | day of the month –[1, 31](public member object) |
int tm_mon | months since January –[0, 11](public member object) |
int tm_year | years since 1900 (public member object) |
int tm_wday | days since Sunday –[0, 6](public member object) |
int tm_yday | days since January 1 –[0, 365](public member object) |
int tm_isdst | Daylight Saving Time flag. The value is positive if DST is in effect, zero if not and negative if no information is available (public member object) |
The Standard mandates only the presence of the aforementioned members in either order. The implementations usually add more data-members to this structure.
Output:
Sat Jan 1 00:00:00 2022
(C23)(C11) | converts time since epoch to calendar time expressed as local time (function)[edit] |
(C23)(C11) | converts time since epoch to calendar time expressed as Coordinated Universal Time (UTC) (function)[edit] |
C++ documentation fortm | |