I am using cakephp4 and a Xero API. I can't find the code to convert a date returned as '/Date(1617667200000+0000)/'
from a Xero API. It is a timestamp with the first 10 digits eg the $rr=gmdate("Y-m-d", 1617667200);
will work but I can't hardcode strings like this or just find the first 10 digits. It's a StringUtil I believe. I tried using JSON date examples as well but not getting anywhere including Xero docs.
$rr=StringUtil::convertStringToDate($date);//no
$rr=gmdate("Y-m-d", $date); //no