mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-12 10:49:07 +02:00
* fix for 17123, rounding issues decodedatetime
git-svn-id: trunk@15804 -
This commit is contained in:
parent
9883c06545
commit
d39c2ed039
@ -1530,8 +1530,14 @@ end;
|
||||
|
||||
Procedure DecodeDateTime(const AValue: TDateTime; out AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word);
|
||||
begin
|
||||
DecodeDate(AValue,AYear,AMonth,ADay);
|
||||
DecodeTime(AValue,AHour,AMinute,ASecond,AMilliSecond);
|
||||
if AHour=24 then // can happen due rounding issues mantis 17123
|
||||
begin
|
||||
AHour:=0; // rest is already zero
|
||||
DecodeDate(round(AValue),AYear,AMonth,ADay);
|
||||
end
|
||||
else
|
||||
DecodeDate(AValue,AYear,AMonth,ADay);
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user