Internet Direct (Indy) Version 9.0.1 Beta
DateTimeToGmtOffSetStr
Retrieves the GMT time offset for a date/time value.

function DateTimeToGmtOffSetStr(ADateTime: TDateTime; SubGMT: Boolean): string;
Parameters
ADateTime: TDateTime
Value to be converted to a GMT offset string.

SubGMT: Boolean
Add the prefix "GMT" to the return value.

Returns
String - The offset from GMT time as a string.

Description
DateTimeToGmtOffSetStr is a String function used to return the time difference for the ADateTime parameter as an Internet Time difference string.

ADateTime is the native Date/Time value to be converted.

SubGMT indicates that the return value should contain the prefix "GMT" prior to the time difference string. When SubGMT is True, the prefix is added to the time difference string, otherwise the prefix is omitted.

To convert an Internet GMT different to a TDateTime, use the GmtOffsetStrToDateTime function.