mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-12 01:30:23 +02:00
* Patch from Serge Anvarov to use local time for keyinfo (bug ID 35100)
git-svn-id: trunk@41855 -
This commit is contained in:
parent
d5f2764dd3
commit
61cd2e219d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user