[fpc-pascal] why the 0.5 in the Unix Epoch (for UnixToDateTime function)

Paul Nance pwnance at gmail.com
Wed Aug 2 00:04:00 CEST 2017


Actually the Julian calendar started at noon, the 0.5 is added to get to
midnight. The Julian calendar was developed for astronomers, who view the
sky when it gets dark and want all observing to be referenced to the same
date. Us normal people start our day at midnight so we have to add the
extra half day.  --  Paul

On Aug 1, 2017 7:14 AM, "Dennis" <dec12 at avidsoft.com.hk> wrote:

> I just noticed that the definition of the constants have 0.5 in it.
> Why?
>
>
> from dateh.inc
> const
>    JulianEpoch = TDateTime(-2415018.5);
>
>    UnixEpoch = JulianEpoch + TDateTime(2440587.5);
>
>
> Dennis
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170801/9916de34/attachment.html>


More information about the fpc-pascal mailing list