用IDTIME的方法:
var temptime:string;
begin
try
IdTime1.Host:='ftz-mis-5';
temptime:=formatdatetime('yyyy-mm-dd hh:mm',IdTime1.DateTime);
form1.caption:=datetimetostr(IdTime1.DateTime);
DecodeDate(date_time,t.wYear,t.wMonth,t.wDay);
DecodeTime(date_time+0.6/ (24*3600),t.wHour,t.wMinute,t.wSecond,t.wMilliseconds);
SetLocalTime(t);
except
end;
end;
-------------------------
NET TIME的方法不用多说了吧。
c:/wINDOWS/system32/net time //ftz-mis-5 /set /y