You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Below code shows the current timezone in the local machine:

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;


  • No labels