procedure AnsyTime (const DatabaseName:string) ;
var
td: _SYSTEMTIME;
ft: FILETIME;
begin
{ DONE -oKingron -cOther : 同步服务器时间 }
with TQuery.Create(Self) do
try
DatabaseName:=DatabaseName;
SQL.Clear;
SQL.Text := 'select td=getdate()';
Open;
DateTimeToSystemTime(FieldByName('td').AsDateTime, td);
SystemTimeToFileTime(td,ft);
LocalFileTimeToFileTime(ft,ft);
FileTimeToSystemTime(ft,td);
SetSystemTime(td);
finally
Free;
end;
end;