Ver Mensaje Individual
  #5  
Antiguo 17-04-2026
Avatar de Casimiro Noteví
Casimiro Noteví Casimiro Noteví is offline
Merodeador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.669
Reputación: 10
Casimiro Noteví Tiene un aura espectacularCasimiro Noteví Tiene un aura espectacular
Algo más o menos como esto:
Código Delphi [-]
var
  t0, t1: TDateTime;
  respuesta: string;
  horaServidor: TDateTime;
  horaLocalAprox: TDateTime;
  diferencia: Double;
begin
  t0 := Now;

  respuesta := NetHTTPClient1.Get('https://intitec.com/debug/getahora.php').ContentAsString;

  t1 := Now;

  horaServidor := StrToDateTime(respuesta);

  horaLocalAprox := (t0 + t1) / 2;

  diferencia := (horaServidor - horaLocalAprox) * 86400; // segundos

  if Abs(diferencia) > 60 then
    ShowMessage('Hora manipulada');
end;
Responder Con Cita