给你一段参考程序(不完全,但是思想完全,字太多,我不想打),:) var tsetDate:Tdatetime; Vdate:Vairant; tTzi:TTimeZoneInformation; tSt:TSystime; begin GetTimeZoneInformation(tTzi); vDate:=tTzi.bias/自定义整数; tSetDate:=tDate+Vdate; with tSt do begin ... wHour:=StrToInt(Formatdatetime('hh',tSetdate)); ... end; SetPCSystem:=SetSystemTime(tSt); end; 试试看,当然,给分了,:-)
var
tsetDate:Tdatetime;
Vdate:Vairant;
tTzi:TTimeZoneInformation;
tSt:TSystime;
begin
GetTimeZoneInformation(tTzi);
vDate:=tTzi.bias/自定义整数;
tSetDate:=tDate+Vdate;
with tSt do
begin
...
wHour:=StrToInt(Formatdatetime('hh',tSetdate));
...
end;
SetPCSystem:=SetSystemTime(tSt);
end;
试试看,当然,给分了,:-)