Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-04

MinDateTime?

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Joost van der Sluis

One of the database tests fails for all databases on handling a date of 1-1-1.

It seems like that there is a 'MinDateTime' defined in sysstrh.inc as follows:

MinDateTime: TDateTime = -657434.0; { 01/01/0100 12:00:00.000 AM }

Why? Why the year 100, and why 12 AM and not 00:00(24h). In several places an exception is raised if you try to use a TDateTime before this date. But why this happens is not clear. Dates before the year 100 works perfectly, except for this hard-coded exception.

So why is it there?

Joost.

Reply by email

Marco van de Voort
to Joost van der Sluis
Show quoted text 14 lines
One of the database tests fails for all databases on handling a date of 1-1-1. It seems like that there is a 'MinDateTime' defined in sysstrh.inc as follows: MinDateTime: TDateTime = -657434.0; { 01/01/0100 12:00:00.000 AM } Why? Why the year 100, and why 12 AM and not 00:00(24h). In several places an exception is raised if you try to use a TDateTime before this date. But why this happens is not clear. Dates before the year 100 works perfectly, except for this hard-coded exception. So why is it there?

I'm not sure, but I might be related to the Y2K fix. twoyearcentury.

Reply by email