...get the time zone?

Author: Simon Grossenbacher
Homepage: http://www.swissdelphicenter.ch

Category: System

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;

 

printed from
www.swissdelphicenter.ch
developers knowledge base