DateTimeToUnix converts a TDateTime value into the corresponding Unix/Linux-style date-and-time value.

Unix/Linux date-and-time values are encoded as the number of seconds since midnight at the start of January 1, 1970.

Declaration: function DateTimeToUnix(const AValue: TDateTime; AInputIsUTC: Boolean): Int64;

A sample of code.

procedure ScriptEvent(var Value:Variant);
var
ThisDate : TDateTime;
UNum : int64;
begin
//NOW is 06-12-2023 12:56:11.285 so UNUM is 1701867371
ThisDate := Now;
UNum := DateTimeToUnix(ThisDate);
LogInfo(FormatDateTime('dd-mm-yyyy hh:nn:ss.zzz', ThisDate));
LogInfo(FloatToStr(Unum));
end;