function GetJavaTime( d: TDateTime ): Int64; var dJavaStart: TDateTime; begin //java里的时间是从1970年1月1日0点到当前的间隔 dJavaStart := EncodeDateTime( 1970, 1, 1, 0, 0, 0, 0 ); Result := MilliSecondsBetween( d, dJavaStart ); end;
时间: 2024-08-25 04:13:26
function GetJavaTime( d: TDateTime ): Int64; var dJavaStart: TDateTime; begin //java里的时间是从1970年1月1日0点到当前的间隔 dJavaStart := EncodeDateTime( 1970, 1, 1, 0, 0, 0, 0 ); Result := MilliSecondsBetween( d, dJavaStart ); end;