![]() |
Gebietsschema & Zeitzone
Wie ermittel ich das auf dem System eingestellte Gebietsschema? & die zugehörige Zeitzone?
|
Hallo,
in der MSDN Online Library steht folgendes ![]() Dort findest Du bestimmt auch eine API-Funktion zum Gebietsschema Die benötigte Struktur (Parameter) ist in Windows.pas als TTimeZoneInformation deklariert (Zeile 4524 (Delphi 5) |
Das habe ich auch schon gefunden, nur werde ich daraus leider nicht wirklich schlau!
|
Hallo,
ich denke so sollte es klappen
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var TZI : TTimeZoneInformation; begin GetTimeZoneInformation(TZI); ShowMessage(TZI.StandardName+#13#10+TZI.DaylightName); end; |
Ja!
Die Zeitzone lese ich jetzt so aus:
Delphi-Quellcode:
Hat jemand eine Idee für das Gebietsschema?
function TForm1.GetTimeZone:string;
var TZI : TTimeZoneInformation; begin case GetTimeZoneInformation(TZI) of TIME_ZONE_ID_UNKNOWN: result:= 'Unbekannt'; TIME_ZONE_ID_DAYLIGHT: result:= TZI.DaylightName; TIME_ZONE_ID_STANDARD: result:= TZI.StandardName; else result:= 'Unbekannt'; end; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:34 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz