linux时间转换 char szBeginTime[32] ={0}; time_t tmBeginTime = time(NULL); struct tm *tmNowBegin = localtime(&tmBeginTime); strftime(szBeginTime,32,"%Y-%m-%d %H:%M:%S",tmNowBegin); fprintf(stderr, "Connect Begin Time %s\n ", szBeginTime );