tm, time_t 转换
//tm->time_t
struct
tm tmDate;
time_t time_tDate;
memset(&tmDate,0,sizeof(tm));
tmDate.tm_year -= 1900; //需要减去1900,否则mktime会返回-1
tmDate.tm_mon -=1;
time_tDate = mktime(&tmDate);
//time_t->tm
time_t tNow;
struct tm tmlocal;
time(&tNow);
tmlocal = *localtime(&tNow);