* Fix wrong TimeStampToMSecs result on 32-bit. Fixes issue #40522

(cherry picked from commit ed000e6cd7)
This commit is contained in:
Michaël Van Canneyt 2023-12-22 11:32:57 +01:00
parent b1f6be15e9
commit bf85a00d58

View File

@ -95,7 +95,8 @@ end;
function TimeStampToMSecs(const TimeStamp: TTimeStamp): Int64;
begin
result := TimeStamp.Time + timestamp.date * msecsperday;
// Int64() typecast fixes issues 40522 and 40568 on 32-bit.
result := TimeStamp.Time + Int64(timestamp.date) * msecsperday;
end;
Function TryEncodeDate(Year,Month,Day : Word; Out Date : TDateTime) : Boolean;