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

Vojtěch Čihák vojtech.cihak at atlas.cz
Tue Aug 1 13:42:55 CEST 2017


Hi,
 
wiki https://en.wikipedia.org/wiki/Julian_day says that "... Julian day number 0 assigned to the day starting at noon on January 1, 4713 BC, ..."
The noon means 0,5.
 
V.
______________________________________________________________
> Od: Dennis <dec12 at avidsoft.com.hk>
> Komu: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
> Datum: 01.08.2017 13:14
> Předmět: [fpc-pascal] why the 0.5 in the Unix Epoch (for UnixToDateTime function)
>
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 <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/d687c6f7/attachment.html>


More information about the fpc-pascal mailing list