70,037
社区成员
发帖
与我相关
我的任务
分享
#include<stdio.h>
#include<time.h>
int main(void)
{
time_t t=time(NULL);
struct tm *tp1=localtime(&t),*tp2=gmtime(&t);
printf("%d\n",tp1->tm_hour); //语句1
printf("ctime=%s",ctime(&t)); //语句2
return 0;
}