#include #include #include int main() { time_t t = time(NULL); if (t == -1) { perror("time"); return 1; } struct tm *tm = localtime(&t); if (tm == NULL) { perror("localtime"); return 1; } printf("Content-Type: text/plain\n\n"); printf("%d-%02d-%02d", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday); return 0; }