#include <stdio.h>
#include <time.h>
int main(void)
{
time_t time_val;
struct tm * pTime;
time(&time_val);
pTime = gmtime(&time_val);
pTime = localtime(&time_val);
printf("%d/%d/%d %d:%d:%d\n", pTime->tm_year + 1900, pTime->tm_mon + 1, pTime->tm_mday + 1,
pTime->tm_hour, pTime->tm_min, pTime->tm_sec);
}
댓글 없음:
댓글 쓰기