On Tue, 30 Dec 2008 09:25:29 -0700
"Seth Grover" <sethdgro...@gmail.com> wrote:

> Is this broken or am I missing something?

I suspect the problem is in this function:

Function SecondsBetween(const ANow, AThen: TDateTime): Int64;
begin
  Result:=Trunc(Abs(ANow-AThen)*SecsPerDay);
end;                                                                            

from the dateutil.inc rtl library. The trunc function is no garantee for
a correct result, and can err downwards. I think it should be rounding
function, or add 0.0005 seconds (1/2 milisecond). Of course this also
depends on the sign of the result.

John
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to