11 printf("Testing mktime() by asking\n");
12 printf("What day of the week is July 4, 2001?\n");
14 time_str.tm_year = 2001 - 1900;
15 time_str.tm_mon = 7 - 1;
20 time_str.tm_isdst = -1;
21 if (mktime(&time_str) == -1)
22 (void)puts("-unknown-");
24 (void)strftime(daybuf, sizeof(daybuf), "%A", &time_str);