获取数字时间,如下面的格式: 2006 09 10 23 26 56源代码如下: int TSP_GetTime( char * sTime) ... { char sBuf[TIME_SIZE+1]; time_t rTemp; struct tm *pTime; time(&rTemp); pTime=gmtime(&rTemp); strftime(sBuf,40,"%m%d%H%M%S",pTime); strcpy(sTime,sBuf);//change value by address;change address:sTime = sBuf; return 1; }