[fpc-devel] File Dates
Michael Van Canneyt
michael at freepascal.org
Sat Jan 29 15:25:18 CET 2005
On Sat, 29 Jan 2005, Marco van de Voort wrote:
> > Michael Van Canneyt wrote:
> > > routines. There are a lot of TDateTime routines in the RTL, they would
> > > all be at your disposal.
> >
> > Okay, I'll use TDateTime internally, with the following questions:
> >
> > FPC defines 1900-1-1 as the start date, whereas Delphi defines
> > 1899-12-30 as the start date - note: neither 1900 nor dec. 31!
> > This requires different constants for converting a Unix date into
> > TDateTime, or portable procedures. What's the suggested way for such
> > conversions?
>
> IIRC there are some problems that lead to multiple definitions for julian dates:
> - original julian starts at noon, so the exact moment taken for the first day
> could be before and after.
> - leaphandling for the year 1900 was not uniform IIRC over all calendars
>
> But I don't know why FPC's definition is not the same as delphi's :-)
The definition is the same. It's also used in variants; that is why it has
this strange form. If the docs say otherwise, then the docs are wrong.
I should check this.
Michael.
More information about the fpc-devel
mailing list