[Overview][Constants][Procedures and functions][Index] |
Convert local time to UTC time
Source position: dateutil.inc line 435
function LocalTimeToUniversal( |
LT: TDateTime |
):TDateTime; |
LT: TDateTime; |
TZOffset: Integer |
):TDateTime; |
UniversalTimeToLocal converts a local time indication to a universal time indication: it undoes the TZOffset time zone offset from the UT Universal time (UTC). If no TZOffset is specified, the local time offset as returned by GetLocalTimeOffset is used.
Note that for times in the past or in the future, or for time zones with DST, omitting the TZoffset may lead to wrong results, as the current time zone offset is used. Calculation of the correct time zone offset for a given date is very complicated, and outside the scope of this call.
|
Convert UTC time to local time |