时间函数举例1

#include <stdio.h>
#include <conio.h>
#include <time.h>
int main()
{      /*时间函数举1*/
    time_t lt; //define a longint time available
    lt=time(NULL); //system time and date
    printf(ctime(&lt)); //english format output
    printf(asctime(localtime(&lt)));//tranfer to tm
    printf(asctime(gmtime(&lt))); //tranfer to greenwich time
    getch();
    return 0;
}

原文地址:https://www.cnblogs.com/wangjingyuwhy/p/2942677.html