- (void) cur_time
{
char *wday[] = {"星期天", "星期一","星期二","星期三","星期四","星期五","星期六"};
time_t timep;
struct tm *p;
time(&timep);
p = localtime(&timep);
printf("%d年%2d月%2d日", (1900 + p->tm_year), (1 + p->tm_mon), p->tm_mday);
printf("%s%2d:%2d:%2d/n", wday[p->tm_wday], p->tm_hour, p->tm_min, p->tm_sec);
}
// p = localtime(&itime);
// p->tm_mday -= 7;
//
// printf("%ld/n", mktime(p));
//
// p->tm_mday -= 14;
//
// printf("%ld/n", mktime(p));