time_t nowtime;time ( &nowtime );timeinfo = localtime (&nowtime);printf("现在日期:%d 年%d月 %d 日 ",ti->tm_year+1900,t->tm_mon+1,t->tm_mday);这样之后再减一下就好了~懂?