Q:如何设置使当前的时间精确到具体的分秒
A:系统默认周期为日线,日期类型的参数指当天的零点零分。如果要确定到具体的某分某秒,参考范例如下:
setsysparam(pn_cycle(),cy_1s()); //设置系统周期为秒线
//构造一个时间为2011年1月13日9点30分5秒
d:= inttodate(20110113)+ strtotime('09:30:05');
setsysparam(pn_date(),d); //设置该时间为系统时间
return datetimetostr(sp_time()); //返回系统时间