18 digit timestamp?

后端 未结 3 1396
不思量自难忘°
不思量自难忘° 2020-12-19 11:10

I am working on a system related to tv recordings.

I am parsing the following xml from another system (to which i have no documentation):



        
3条回答
  •  不思量自难忘°
    2020-12-19 11:47

    $dateLargeInt= "131424999530821857";
    $secsAfterADEpoch = $dateLargeInt / (10000000); 
    $ADToUnixConvertor=((1970-1601) * 365.242190) * 86400;
    // unix epoch - AD epoch * number of tropical days * seconds in a day 
    $unixTsLastLogon=intval($secsAfterADEpoch-$ADToUnixConvertor); 
    
    // unix Timestamp version of AD timestamp
    $lastlogon=date("d-m-Y", $unixTsLastLogon); // formatted date
    
    echo $lastlogon;
    

提交回复
热议问题