18 digit timestamp?

后端 未结 3 1399
不思量自难忘°
不思量自难忘° 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:46

    With the gmp lib installed in php you can do it like this:

    $epoch     = '621355968000000000';
    $newtime   = gmp_sub($dateTime, $epoch);
    $newtime   = gmp_div($newtime, '10000000');
    $timestamp = gmp_strval($newtime);
    

    and now you got a date:

    echo date('Y-m-d H:i:s', $timestamp);
    

提交回复
热议问题