FIX: Zip - use GMT time if available when extract

This commit is contained in:
Alexander Koblov 2022-01-19 20:53:03 +03:00
commit d2b2920c29

View file

@ -413,6 +413,7 @@ type
function GetLastModFileTime : Word; override;
function GetNativeFileAttributes : LongInt; override;
function GetNativeLastModFileTime: Longint; override;
function GetLastModTimeAsDateTime: TDateTime; override;
procedure SetCompressedSize( const Value : Int64 ); override;
procedure SetCRC32( const Value : Longint ); override;
procedure SetExternalFileAttributes( Value : LongWord ); override;
@ -1455,6 +1456,14 @@ begin
{$ENDIF}
end;
{ -------------------------------------------------------------------------- }
function TAbZipItem.GetLastModTimeAsDateTime: TDateTime;
begin
if (FDateTime <> 0) then
Result := FDateTime
else
Result := AbDosFileDateToDateTime(FItemInfo.LastModFileDate, FItemInfo.LastModFileTime);
end;
{ -------------------------------------------------------------------------- }
function TAbZipItem.GetShannonFanoTreeCount : Byte;
begin
Result := FItemInfo.ShannonFanoTreeCount;