[fpc-devel] Definition of the time-fration in a TDateTime before 30/12/1899
Michael Van Canneyt
michael at freepascal.org
Mon May 22 11:15:28 CEST 2006
On Mon, 22 May 2006, Bram Kuijvenhoven wrote:
> Michael Van Canneyt wrote:
>> The following remark in the Delphi help sheds more light on the issue:
>>
>> "When working with negative TDateTime values, computations must handle
>> time portion separately. The fractional part reflects the fraction of
>> a 24-hour day without regard to the sign of the TDateTime value.
>> For example,
>> 6:00 am on 12/29/1899 is -1.25,
>> Not
>> -1 + 0.25,
>> which would be -0.75. There are no TDateTime values between -1 and 0."
>
> This is really bad -- I supposed the TDateTime was a nice 'linear' mapping of
> time (which is much nicer for all kinds of calculations).
It is, but only for dates after 1899-12-30. God only knows why Microsoft
picked this date.
Michael.
More information about the fpc-devel
mailing list