利用UF函数获取系统的日期和时间:
UF_system_info_t info;
UF_system_info_t info;
设置一个string类型的变量获取时间,在创建一个char类型的数组将string中系统时间变为日期:
string formatdata = info.date_buf;
char msg[256];
sprintf(msg,"%s-%s-%s",formatdata.substr(0,4),formatdata.substr(5,2),formatdata.substr(8,2));
最后设置日期,将得到的系统日期和自己设置的ui建立联系:
PropertyList *blockriqitProps = string02->GetProperties();
blockriqitProps -> SetString("Value",msg);
delete blockriqitProps;
blockriqitProps = NULL;
释放获取的系统时间所占的内存:
UF_free_system_info(&info);