DecodeRfcDateTime function
function DecodeRfcDateTime(Value: string): TDateTime;
Unit
SynaUtil
Description
Decode various string representations of date and time to Tdatetime type. This function do all timezone corrections too!
This function can decode lot of formats like:
ddd, d mmm yyyy hh:mm:ss
ddd, d mmm yy hh:mm:ss
ddd, mmm d yyyy hh:mm:ss
ddd mmm dd hh:mm:ss yyyy
and more with lot of modifications, include:
Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() Format
Timezone corrections known lot of symbolic timezone names (like CEST, EDT, etc.) or numeric representation (like +0200). By convention defined in RFC timezone +0000 is GMT and -0000 is current your system timezone.
See also:
AnsiCDateTime, CDateTime, Rfc822DateTime, SimpleDateTime