/* a sample program that shows the use of mktime() */ #include #include int main() { struct tm t; time_t t_of_day; t.tm_year = 1999-1900; t.tm_mon = 6; t.tm_mday = 12; t.tm_hour = 2; t.tm_min = 30; t.tm_sec = 1; t.tm_isdst = 0; t_of_day = mktime(&t); printf(ctime(&t_of_day)); }