int get_sys_time(char * timeinfo_p)
{
time_t rawtime;
time(&rawtime);
struct tm timeinfo;
memcpy(&timeinfo,localtime(&rawtime),sizeof(struct tm));
sprintf(timeinfo_p, "%d-%02d-%02dT%02d:%02d:%02d\+08:00",1900+timeinfo.tm_year,timeinfo.tm_mon+1,
timeinfo.tm_mday,timeinfo.tm_hour,
timeinfo.tm_min,timeinfo.tm_sec);
}
获取系统时间
最新推荐文章于 2024-04-10 10:28:15 发布