[fpc-devel] negative TDateTime values and MinDateTime
LacaK
lacak at zoznam.sk
Tue Aug 2 13:45:05 CEST 2011
Hi ,
I have problem with comparing negative datetime values in fcl-db test
suite (accessed as variants).
It is related to VariantToDate function (in cvarutil.inc), where result
is tested against MinDateTime.
For example:
v1 :=strtodatetime('01.01.0001 12:00:00');
v2 :=strtodatetime('01.01.0001 13:00:00');
if v2>v1 then ... //<--exception here
Exception is raised because v2<MinDateTime { 01/01/0001 12:00:00.000 AM }.
But logicaly on timeline is "v2" after "v1".
What do you think, can we change MinDateTime from -693593.0 to -693594.0;
(to accept 01/01/0001 23:59:59.999)
...
-Laco.
More information about the fpc-devel
mailing list