首页 > 其他分享 >UF获得系统时间UF_ask_system_info(&info)

UF获得系统时间UF_ask_system_info(&info)

时间:2023-03-10 13:56:08浏览次数:34  
标签:info blockRiqiProps system formatdate ask UF

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

相关文章