* Patch from Serge Anvarov to use local time for keyinfo (bug ID 35100)

git-svn-id: trunk@41855 -
This commit is contained in:
michael 2019-04-10 09:18:01 +00:00
parent d5f2764dd3
commit 61cd2e219d

View File

@ -148,6 +148,7 @@ function TRegistry.GetKeyInfo(out Value: TRegKeyInfo): Boolean;
var
winFileTime: Windows.FILETIME;
sysTime: TSystemTime;
LocalFileTime: Windows.FILETIME;
begin
FillChar(Value, SizeOf(Value), 0);
With Value do
@ -157,9 +158,9 @@ begin
lpdword(@MaxDataLen),nil,@winFileTime);
Result:=FLastError=ERROR_SUCCESS;
end;
if Result then
if Result and FileTimeToLocalFileTime(@winFileTime, @LocalFileTime) and
FileTimeToSystemTime(@LocalFileTime, @sysTime) then
begin
FileTimeToSystemTime(@winFileTime, @sysTime);
Value.FileTime := SystemTimeToDateTime(sysTime);
end;
end;