#include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <stddef.h> #include <time.h> int main() { struct tm *t; time_t tt; time(&tt); t = localtime(&tt); printf("%4d-%02d-%02d %02d:%02d:%02d\n", t->tm_year+1900, t->tm_mon+1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec); //printf("Hello world!\n"); return 0; }