64_常用时间函数

来源:互联网 发布:软件开源有什么用 编辑:程序博客网 时间:2024/05/22 06:47
//_64_常用时间函数//_64_main.cpp#include <stdio.h>#include <stdlib.h>#include <time.h>int main(){struct tm *local;time_t tm;//定义time_t类型的变量tm = time(NULL);local = localtime(&tm);printf("Local time and date: %s\n",asctime(local));local = gmtime(&tm);printf("UTC time and date: %s\n",asctime(local));system("pause");return 0;}

0 0