◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back► ─────Run-Time Library─────────────────────────────────────────────────────── The mktime function converts the time structure pointed to by <timeptr> into a fully defined structure with "normalized" values. Then the function converts the contents of the structure into a time_t calendar time value. The structure at <timeptr> may be incomplete. The mktime function handles dates in any time zone from midnight, December 31, 1899 to midnight, February 5, 2036. The converted time has the same encoding as the values returned by the time function. The original values of the tm_wday and tm_yday components of the <timeptr> structure are ignored, and the original values of the other components are not restricted to their normal ranges. If successful, mktime sets the values of tm_wday and tm_yday appropriately. It sets the other components to represent the specified calendar time, but their values are forced to the normal ranges. The final value of tm_mday is not set until tm_mon and tm_year are determined. Note that the gmtime and localtime functions use a single statically allocated buffer for the conversion. If you supply this buffer to mktime, the previous contents will be destroyed. Return Value The mktime function returns the specified calendar time encoded as a value of type time_t. If <timeptr> references a date before midnight, December 31, 1899, mktime returns -1 cast as type time_t. -♦-