[Overview][Constants][Procedures and functions][Index] Reference for unit 'dateutils' (#rtl)


Convert UTC time to local time


Source position: dateutil.inc line 429

function UniversalTimeToLocal(

  UT: TDateTime


function UniversalTimeToLocal(

  UT: TDateTime;

  TZOffset: Integer



UniversalTimeToLocal converts a universal time indication to a local time: it applies the TZOffset timezone offset to 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 timezones with DST, omitting the TZoffset may lead to wrong results, as the current timezone offset is used. Calculation of the correct timezone offset for a given date is very complicated, and outside the scope of this call.

See also




Convert local time to UTC time

Documentation generated on: Mar 17 2017