C Language: mktime function
(Convert to Calendar Time)
In the C Programming Language, the mktime function converts a broken-down local time (pointed to by timeptr) and returns a pointer to a calendar time.
Syntax
The syntax for the mktime function in the C Language is:
time_t mktime(struct tm *timeptr);
Parameters or Arguments
- timeptr
- A pointer to a structure that contains a broken-down local time to convert.
Returns
The mktime function returns a calendar time that describes a broken-down local time pointed to by timeptr.
If there is an error, the mktime function will return -1.
Required Header
In the C Language, the required header for the mktime function is:
#include <time.h>
Applies To
In the C Language, the mktime function can be used in the following versions:
- ANSI/ISO 9899-1990
Similar Functions
Other C functions that are similar to the mktime function:
Advertisements