Indy 9
GmtOffsetStrToDateTime
See Also, Unit: IdGlobal
Converts an Internet time difference string to a native date/time value.
function GmtOffsetStrToDateTime(S: string): TDateTime;
Unit
IdGlobal
Parameters
S: string
The Internet time difference string to be converted.
Return Value
TDateTime - Native date/time representation of the time difference string.
Description
GmtOffsetStrToDateTime is a TDateTime function used to convert the Internet time difference string in S to a native TDateTime value.

The return value for GmtOffsetStrToDateTime will contain the time difference from S encoded as a TDateTime value, and can contain either a positive or a negative number of offset hours.

The return value for GmtOffsetStrToDateTime can be 0.0 if an error occurs during calculation of the offset value.

GmtOffsetStrToDateTime can be used to create a value that can be added to a TDateTime value expressed in another time zone, to adjust to the local time zone.

To convert a TDateTime to an Internet Time difference, use the DateTimeToGmtOffSetStr function.


Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.