Delphi – Unix timestamp to datetime does not work

I have the following timestamp: 1444288186967.

When I put that in a Epoch Converter, I get correcly 08 Oct 2015 07:09:46 as result.

Although, when I use (as mentioned in another post) the function UnixToDateTime(const AValue: Int64): TDateTime I get 02 Sep 47737 11:02:47. Strange isn’t it?

My code (using TMS Aurelius)

Person.EndDate.Value := UnixToDateTime(FHit.TimestampUntil);

Where FHit.TimestampUntil is a Int64 as the UnixToDateTime function expects.

The Person.EndDate.Value is a TMS Aurelius Nullable TDateTime.

How is it possible that I get such date as result?

Thanks in advance!


Source: unix

Leave a Reply