On Tue, September 17, 2013 20:51, Lubomír Čabla wrote: > Yes, I know, you are right, so far I've used DOS utility GetDate/GetTime > without any errors. > > I wanted to update the old compiler 1.x to the new version, but it seems > will stay with the old version.
There should be no problem to continue using GetDate/GetTime with current FPC version. Tomas > > On Tue, Sep 17, 2013 at 8:31 PM, Tomas Hajny <xhaj...@hajny.biz> wrote: > >> On Tue, September 17, 2013 20:22, Lubomír Čabla wrote: >> > 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. >> >> As a principle, you can never avoid such errors if using floating point >> numbers. If you need absolutely precise results, use integers. >> >> Tomas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal