解决了本地时间和格林尼治时间差问题
function DateTimeToTimeStamp(ConvDate: TDateTime): time_t;
var
zi: TTimeZoneInformation;
begin
GetTimeZoneInformation(zi);
Result := Round((ConvDate - UnixDateDelta) * 86400) + 60 * (zi.Bias + zi.DaylightBias);
end;
function TimeStampToDateTime(USec: time_t): TDateTime;
var
zi: TTimeZoneInformation;
begin
GetTimeZoneInformation(zi);
Result := ((USec - 60 * zi.Bias) / 86400) + UnixDateDelta;
end;