Lazarus Pascal
Lazarus Pascal
Example: Http.GenTimeStamp method
Demonstrates theGenTimeStamp method.
Chilkat Lazarus Pascal Downloads
program ChilkatDemo;
// Demonstrates using the Chilkat Pascal wrapper via the C bridge DLL.
// Builds as a console application under Lazarus (FPC) or Delphi.
{$IFDEF FPC}
{$MODE DELPHI}
{$ENDIF}
{$APPTYPE CONSOLE}
uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
SysUtils,
CkDllLoader,
Chilkat.Http;
// ---------------------------------------------------------------------------
procedure RunDemo;
var
http: THttp;
timestamp: string;
begin
http := THttp.Create;
// Return current date/time in the following format: Day, DD Mon YYYY HH:MM:SS GMT
timestamp := http.GenTimeStamp();
WriteLn(timestamp);
// Sample Output:
// Thu, 21 Aug 2025 11:17:31 GMT
http.Free;
end;
// ---------------------------------------------------------------------------
begin
try
RunDemo;
except
on E: Exception do
WriteLn('Unhandled exception: ', E.ClassName, ': ', E.Message);
end;
WriteLn;
{$IFDEF MSWINDOWS}
WriteLn('Press Enter to exit...');
ReadLn;
{$ENDIF}
end.