Sign in Join
FPDoc Onlineexperiment

ParseHTTPDateTime function

In unit HTTPProtocol

Parses HTTP date/time strings to TDateTime.

Declaration

pascal
function ParseHTTPDateTime(const aTimestamp: string): TDateTime

Arguments

aTimestamp

The HTTP date/time string to parse.

Function result

The parsed date/time value, or 0 if invalid.

Description

Converts HTTP-formatted date/time strings (as used in headers like Last-Modified, Expires) to Pascal TDateTime values. Handles various HTTP date formats and ignores day names and GMT suffix.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.