* Fix bug ID #26512

git-svn-id: trunk@30620 -
This commit is contained in:
michael 2015-04-17 16:44:11 +00:00
parent f67cbabdc6
commit 3b33b2a7bc

View File

@ -164,6 +164,8 @@ begin
Date:=Date+1/(msecsperday*2)
else
Date:=Date-1/(msecsperday*2);
if Date>MaxDateTime then
Raise EConvertError.CreateFmt('%f is not a valid TDatetime encoding, maximum value is %f.',[Date,MaxDateTime]);
j := pred((Trunc(System.Int(Date)) + 693900) SHL 2);
ly:= j DIV 146097;
j:= j - 146097 * cardinal(ly);