int year, month, day; sscanf(namelist[2]->d_name, "%2d%2d%2d", &year, &month, &day); struct tm tmp; tmp.tm_mday = day; tmp.tm_mon = month; tmp.tm_year = year + 2000 - 1900; time_t epoch = mktime(&tmp); epoch += 24*60*60; struct tm *tmp2 = localtime(&epoch); tmp=*tmp2; strftime(buffer, SIZE, "%y%m%d", &tmp); if (strcmp(buffer, namelist[3]->d_name) != 0) {
No comments:
Post a Comment