dateconversion.zip
The conversion between TDateTime
and Julian dates and
modified Julian dates in unit dateutils
is not compatible with
the Delphi versions. After some experimentation, I ascertained that the
problem was in two routines, DateTimeToJulianDate
TryJulianDateToDateTime
. Turns out that the conversion is done for
days, excluding any fractions of a day. I have raised a ticket in the Free Pascal
bugtracker and hopefully a correction will be applied shortly.
In the meantime, the errors can be seen by comparing the results
obtained with dateconversion (download the archive dateconversion.zip) with
those from a reputable conversion site such as
NASA's Goddard Space Flight Center. If the checkbox Use corrected
functions
is checked then functions with my proposed corrections will
be used instead of those in dateutils
.