mktime normalizes a local broken-down time stored in struct tm, fills its derived fields, and returns the corresponding time_t value. section 8.6
Function form
time_t result = mktime(&tm); passes a struct tm to mktime. The function normalizes hierarchical date members, computes tm_wday and tm_yday, and resolves tm_isdst when it is negative. section 8.6
mktime performs three related operations:
- Normalizes hierarchical date members to their respective ranges. section 8.6
- Sets tm_wday and tm_yday to their corresponding weekday and day-of-year values. section 8.6
- Changes a negative tm_isdst to 1 or 0 according to daylight-saving time on the local platform. section 8.6
- Returns a time_t on a linear time scale, commonly associated with an epoch near January 1, 1970, though the epoch is not guaranteed. section 8.6

