![]() |
Systemzeit setzen (NT,W2000,XP)
Hai :hi:
gibt es eine möglichkeit aus meinem Delphiprogramm heraus die Systemzeit von Windows zu setzen? |
Re: Systemzeit setzen (NT,W2000,XP)
SetSystemTime.
|
Re: Systemzeit setzen (NT,W2000,XP)
Zitat:
Habe immer nur nach SetTime gesucht Danke dir! :mrgreen: |
Re: Systemzeit setzen (NT,W2000,XP)
Hai,
nur zur kontrolle. Habe ich das so richtig verstanden mit den TimeZone-Informationen?
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var systemzeit : TSystemTime; zeitzone : TTimeZoneInformation; localdiff : Integer; begin Case GetTimeZoneInformation (zeitzone) of TIME_ZONE_ID_STANDARD : localdiff := (zeitzone.Bias div 60); TIME_ZONE_ID_DAYLIGHT : localdiff := (zeitzone.Bias div 60) + (zeitzone.DaylightBias div 60); end; with systemzeit do begin wYear := 2003; wMonth := 9; wDay := 18; wHour := StrToInt (Edit1.Text) + localdiff; wMinute := StrToInt (Edit2.Text); wSecond := StrToInt (Edit3.Text); wMilliseconds := 0; end; SetSystemTime (systmzeit); end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:12 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 by Thomas Breitkreuz