time_t mktime(tm *tp);

mktime validates (and updates) the *tp struct to ensure that the tm_sec, tm_min, tm_hour, tm_mon fields are within the supported integer ranges and the tm_mday, tm_mon and tm_year fields are consistent. The validated *tp struct is converted to the number of seconds since UTC 1 January 1970 and returned.