解决了本地时间和格林尼治时间差问题

function DateTimeToTp(ConvDate: TDateTime): time_t;
var
zi: TTimeZoneInformation;
begin
GetTimeZoneInformation(zi);
Result := Round((ConvDate - UnixDateDelta) * 86400) + 60 * (zi.Bias + zi.DaylightBias);
end;

function TpToDateTime(UnConvDate: time_t): TDateTime;
var
zi: TTimeZoneInformation;
begin
GetTimeZoneInformation(zi);
Result := ((UnConvDate - 60 * zi.Bias) / 86400) + UnixDateDelta;
end;