[fpc-pascal] FPC GO32 2.6.2 wrong result from SecondsBetween

Lubomír Čabla kladno at gmail.com
Tue Sep 17 20:22:21 CEST 2013


It may be, but I tried to use EncodeDateTime with the same result:

DT1:=EncodeDateTime(2013,5,28,15,26,1,0);
DT2:=EncodeDateTime(2013,5,28,15,27,1,0);

Function EncodeDateTime calls TryEncodeDateTime that uses TryEncodeDate and
TryEncodeTime.

This is only a test, I want to be sure that after comparing the two values
​​get the correct time difference and 59 seconds is not correct.


On Tue, Sep 17, 2013 at 6:15 PM, Bart <bartjunk64 at gmail.com> wrote:

> On 9/17/13, Lubomír Čabla <kladno at gmail.com> wrote:
> > I am doing something wrong?
>
> Probably rounding errors:
>   DT1:=EncodeDate(2013,5,28)+EncodeTime(15,26,1,0);
> 2 calculations on floating numbers
>
>   DT1:=EncodeTime(15,26,1,0);
> 1 calculation on floating numbers
>
> Bart
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130917/07b647bf/attachment.html>


More information about the fpc-pascal mailing list