time(¤tTime);
struct tm *tm_t=localtime(¤tTime);
char *tmp_time=new char[200];
//tm_mon The number of months since January, in the range 0 to 11.
sprintf(tmp_time,"%d-%02d-%02d %02d:%02d:%02d",tm_t->tm_year+1900,tm_t->tm_mon+1,tm_t->tm_mday,tm_t->tm_hour,tm_t->tm_min,tm_t->tm_sec);
struct tm {
int tm_sec; /* seconds */
int tm_min; /* minutes */
int tm_hour; /* hours */
int tm_mday; /* day of the month */
int tm_mon; /* month */
int tm_year; /* year */
int tm_wday; /* day of the week */
int tm_yday; /* day in the year */
int tm_isdst; /* daylight saving time */
};
tm_sec The number of seconds after the minute, normally in the range 0 to 59, but can be up to |