mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-03 05:52:45 +02:00
* Windows RTL: Simplify SysUtils.GetLocalTime(). TSystemTime type for these targets matches one defined in Windows unit, so WinAPI function result can be used directly. Resolves #18346.
git-svn-id: trunk@16665 -
This commit is contained in:
parent
2222f2c44b
commit
15e1abddf7
@ -579,17 +579,8 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
Procedure GetLocalTime(var SystemTime: TSystemTime);
|
Procedure GetLocalTime(var SystemTime: TSystemTime);
|
||||||
Var
|
|
||||||
Syst : Windows.TSystemtime;
|
|
||||||
begin
|
begin
|
||||||
windows.Getlocaltime(@syst);
|
windows.Getlocaltime(SystemTime);
|
||||||
SystemTime.year:=syst.wYear;
|
|
||||||
SystemTime.month:=syst.wMonth;
|
|
||||||
SystemTime.day:=syst.wDay;
|
|
||||||
SystemTime.hour:=syst.wHour;
|
|
||||||
SystemTime.minute:=syst.wMinute;
|
|
||||||
SystemTime.second:=syst.wSecond;
|
|
||||||
SystemTime.millisecond:=syst.wMilliSeconds;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -458,17 +458,8 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
Procedure GetLocalTime(var SystemTime: TSystemTime);
|
Procedure GetLocalTime(var SystemTime: TSystemTime);
|
||||||
Var
|
|
||||||
Syst : Windows.TSystemtime;
|
|
||||||
begin
|
begin
|
||||||
windows.Getlocaltime(@syst);
|
windows.Getlocaltime(SystemTime);
|
||||||
SystemTime.year:=syst.wYear;
|
|
||||||
SystemTime.month:=syst.wMonth;
|
|
||||||
SystemTime.day:=syst.wDay;
|
|
||||||
SystemTime.hour:=syst.wHour;
|
|
||||||
SystemTime.minute:=syst.wMinute;
|
|
||||||
SystemTime.second:=syst.wSecond;
|
|
||||||
SystemTime.millisecond:=syst.wMilliSeconds;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user