今天 2019-01-11T03:23:40.225Z 时间格式转换为毫秒时间戳 找了好久 才找到

#  2019-01-11T03:23:40.225Z to 1547177020225
function get_data_format($time)
{
    list($usec, $sec) = explode(".", $time);
    $date = strtotime($usec);

    return (int)str_pad($date . $sec, 13, "0", STR_PAD_RIGHT);
}

function get_microtime_format($time)
{
    if (strstr($time, '.')) {
        sprintf("%01.3f", $time);
        list($usec, $sec) = explode(".", $time);
        $sec = str_pad($sec, 3, "0", STR_PAD_RIGHT);
    } else {
        $usec = $time;
        $sec = "000";
    }
    $date = date("Y-m-d H:i:s.x", $usec);

    return str_replace("x", $sec, $date);
}