随便用什么方法把时间转成字符串传出来,收到以后:
procedure TMainForm.RemoteSetSystemClock(s: string);
var
y, m, d: Word;
h, Min, ss, ms: Word;
NewTime: SystemTime;
DateTime: TDateTime;
begin
DateTime:=StrToDateTime(s);
DecodeDate(DateTime, y, m, d);
DecodeTime(DateTime, h, Min, ss, ms);
NewTime.wYear:=y;
NewTime.wMonth:=m;
NewTime.wDay:=d;
NewTime.wHour:=h;
NewTime.wMinute:=Min;
NewTime.wSecond:=ss;
NewTime.wMilliseconds:=ms;
SetLocalTime(NewTime)
end;