On 15 November 2012 17:26, Nesler, Thomas J <tnes...@amfam.com> wrote:
> function UNIXTimeToDateTimeFAST(UnixTime: LongWord): TDateTime; > begin > Result := (UnixTime / 86400) + 25569; > end; > > I wish I knew why the function added 25569 to the number, but I don't. > Well, 25569 is close to the number of days between 1970 and 1904 which a quick mental calculation came out close to 24100 dependent on when leap years occurred. Regards Tony Foale i...@tonyfoale.com http://www.tonyfoale.com http://picasaweb.google.com/tonyfoale https://www.facebook.com/tony.foale.5 https://www.youtube.com/user/MotoChassis _______________________________________________ Delphi mailing list Delphi@elists.org http://lists.elists.org/cgi-bin/mailman/listinfo/delphi