Skip to end of metadata
Go to start of metadata

GetTimeZoneInformation() enables you to get timezone information in standard name, standard bias, daylight name, and daylight bias.

Below code shows the current timezone in the local machine:

uses System.DateUtils;

.
.
.

procedure TMainFrm.GetTimezone;
var
  s: String;
  ZoneInfo: TTimeZoneInformation;
begin
  GetTimeZoneInformation(ZoneInfo);
  s := 'Bias: ' + IntToStr(ZoneInfo.Bias);
  s := s + #13 + #10 + 'StandardName: ' + ZoneInfo.StandardName;
  s := s + #13 + #10 + 'StandardBias: ' + IntToStr(ZoneInfo.StandardBias);
  s := s + #13 + #10 + 'DaylightName: ' + ZoneInfo.DaylightName;
  s := s + #13 + #10 + 'DaylightBias: ' + IntToStr(ZoneInfo.DaylightBias);
end;

You will see the result like below: