<?php $TargetDate = 10005248; $Offset = 14400; function TDateTime2DateTime($date,...$offset){ // Magic delphi TDateTime of 01/01/1970 $UnixStartDate = 25569.0; return round(($date - $UnixStartDate) * 86400) + (int)$offset; } function DateTime2TDateTime($date){ // Magic delphi TDateTime of 01/01/1970 $UnixStartDate = 25569.0; return (float) ($date / 86400) + $UnixStartDate; } echo TDateTime2DateTime($TargetDate,$Offset)."\n"; echo DateTime2TDateTime(862244265600);
You have javascript disabled. You will not be able to edit any code.