function DateTimeTotime_t(dt:TDateTime)WORD;
var
TimeDec:Integer;
Info:TTimeZoneInformation;
begin
GetTimeZoneInformation(Info);
TimeDec:=Info.Bias*60;//分->秒
//25569;//='1970-01-01 00:00:00'
Result:=Round((dt-25569)*86400)+TimeDec;
end;
function time_tToDateTime(iTimeWORD):TDateTime;
var
dt:TDateTime;
TimeDec:Integer;
iiTime:Int64;
Info:TTimeZoneInformation;
begin
iiTime:=iTime;
GetTimeZoneInformation(Info);
TimeDec:=Info.Bias*60;//分->秒
dt:=(iiTime-TimeDec)/86400+25569;
Result:=dt;
end;