Subject | Re: [firebird-support] Re: Timestamp difference Windows / Linux |
---|---|
Author | Kjell Rilbe |
Post date | 2008-08-18T18:51:30Z |
roydamman wrote:
TDateTime values for equality but, as SET mentioned, for
"almost-equality", i.e. allow some small diff. You will get into trouble
with floating point arithemtic precision and rounding errors otherwise.
With that in mind, I think your code would probably turn out less error
prone and easier to understand if you actually made the switch to
rdb$db_key or the int record version column I suggested. In my
experience, in such cases, it's always better to do the switch sooner
than later.
Kjell
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64
> My solution for Delphi users:You still have to make sure you don't test these calculated Delphi
TDateTime values for equality but, as SET mentioned, for
"almost-equality", i.e. allow some small diff. You will get into trouble
with floating point arithemtic precision and rounding errors otherwise.
With that in mind, I think your code would probably turn out less error
prone and easier to understand if you actually made the switch to
rdb$db_key or the int record version column I suggested. In my
experience, in such cases, it's always better to do the switch sooner
than later.
Kjell
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64