The createDateTimeFromSystemTime() function returns a DateTime object. It can be used universally and also works under 32-bit systems. With other parameters for $basis and $resolution, this function can also process other time stamps (LabVIEW Timestamp, Mac Timestamp ..)
function createDateTimeFromSystemTime(
$time, //num.String, integer or float
$basis = '1601-1-1',
$resolution = 1.E-7,
$timeZone = 'UTC'
){
return date_create($basis.' UTC')
->modify(round($time * $resolution).' Seconds')
->setTimeZone(new DateTimeZone($timeZone));
}
How to use for LDAP-Timestamp:
$ldapTimestamp = "132497313049180481";
$dateTime = createDateTimeFromSystemTime($ldapTimestamp);
echo $dateTime->format('Y-m-d H:i:s T');
//2020-11-13 08:55:05 UTC
The algorithm is from this class.