struct tm *local_time = NULL; char str_time[100]; dialog->begin_time = time (NULL); local_time = localtime(&dialog->begin_time); strftime(str_time, sizeof(str_time), "%Y-%m-%d:%H:%M:%S", local_time); cout<<"begin time:"<<str_time<<endl;
C++ time_t 格式化时间输出
最新推荐文章于 2024-10-04 22:32:07 发布