Mega Code Archive

 
Categories / Delphi / System
 

How to get the time zone

Title: How to get the time zone function GetTimeZone: string; var TimeZone: TTimeZoneInformation; begin GetTimeZoneInformation(TimeZone); Result := 'GMT ' + IntToStr(TimeZone.Bias div -60); end; procedure TForm1.Button1Click(Sender: TObject); begin label1.Caption := GetTimeZone; end;