时间:2020-11-25 11:37:12 | 栏目:C代码 | 点击:次
函数原型:
代码示例:
int main ()
{
time_t rawtime;
struct tm * timeinfo;
char buffer [128];
time (&rawtime);
timeinfo = localtime (&rawtime);
strftime (buffer,sizeof(buffer),"Now is %Y/%m/%d %H:%M:%S",timeinfo);
puts (buffer);
return 0;
}