#include #include #include int main(int argc, char const *argv[]) { time_t timestamp = time(NULL); struct tm * timeInfos = localtime(& timestamp); printf("%04d/%02d/%02d\n", timeInfos->tm_year+1900, timeInfos->tm_mon+1,timeInfos->tm_mday); return 0; }