void PartEdit::formatThedate() //获得系统时间
{
//获得日期
UF_initialize();
UF_system_info_t info;
UF_ask_system_info(&info);
//格式化日期
string formatdate = info.date_buf;
char msg[256];
sprintf(msg, "%s.%s.%s", formatdate.substr(0, 4), formatdate.substr(5, 2), formatdate.substr(8, 2));
//设置日期
PropertyList *blockRiqiProps = XGSJ->GetProperties();
blockRiqiProps->SetString("Value", msg);
delete blockRiqiProps;
blockRiqiProps = NULL;
UF_free_system_info(&info);
UF_terminate();
}
标签:info,blockRiqiProps,system,formatdate,ask,UF From: https://www.cnblogs.com/firetuo/p/17203102.html