procedure TServiceFrm.Button1Click(Sender: TObject);
var
date_time: TDateTime;
t: _SYSTEMTIME;
begin
With AdoQuery1do
begin
Close;
SQL.Clear;
SQL.Add('select sysdate from dual');
Open;
Date_Time := Fields[0].AsDateTime;
end;
DecodeDate(date_time,t.wYear,t.wMonth,t.wDay);
DecodeTime(Date_time,t.wHour,t.wMinute,t.wSecond,t.wMilliseconds);
SetLocalTime(t);
end;
問題解決: 感謝各位的回帖。