#include <limits.h>
#include <stdio.h>
#include <time.h>
int main(void) {
struct tm test = {0};
test.tm_mon = 1;
test.tm_sec = 90;
test.tm_year = 200;
printf("time_t is %d bits long.\n", CHAR_BIT * (int)sizeof (time_t));
if (mktime(&test) == (time_t)-1) {
printf("error normalizing\n");
} else {
printf("normalized to %d-%02d-%02d T %02d:%02d:%02d\n",
test.tm_year + 1900,
test.tm_mon + 1,
test.tm_mday,
test.tm_hour,
test.tm_min,
test.tm_sec);
}
return 0;
}