mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 16:49:20 +02:00
* Fix wrong TimeStampToMSecs result on 32-bit. Fixes issue #40522
(cherry picked from commit ed000e6cd7
)
This commit is contained in:
parent
b1f6be15e9
commit
bf85a00d58
@ -95,7 +95,8 @@ end;
|
|||||||
|
|
||||||
function TimeStampToMSecs(const TimeStamp: TTimeStamp): Int64;
|
function TimeStampToMSecs(const TimeStamp: TTimeStamp): Int64;
|
||||||
begin
|
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;
|
end;
|
||||||
|
|
||||||
Function TryEncodeDate(Year,Month,Day : Word; Out Date : TDateTime) : Boolean;
|
Function TryEncodeDate(Year,Month,Day : Word; Out Date : TDateTime) : Boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user