mktime function — Makes a time from parts
time_t mktime(tm* tmptr)
The mktime
function makes a
time_t
time by assembling the
parts in a tm
object, interpreted
as local time. The tm_wday
and
tm_yday
members are ignored, and
other fields are permitted to be outside their normal ranges.
If the conversion is successful, the corresponding time is
returned, the tm_wday
and
tm_yday
members are set, and the
other fields are changed if necessary to reflect their normal
ranges.
If the time cannot be represented as a time_t
value, static_cast<time_t>(-1)
is
returned.