DateTime解析错误,未找到时区和舍入时间

The following script returns the following error.

foreach($data[key($data)] as $index=>$row) {
    $dt = new \DateTime($row['time']);
    $dt->setTimeZone($o->dateTimeZone);
    //...
}

DateTime::__construct(): Failed to parse time string (2018-07-10T17:52:33.931841554Z) at position 0 (2): The timezone could not be found in the database (0)

Is the error caused by 2018-07-10T17:52:33.931841554Z having to many digits? If so, how should I round it to less digits so it doesn't cause an error? Or is it caused by something else?

A little bit of a hack, but this is what I ended up doing.

foreach($data[key($data)] as $index=>$row) {
    if($fraction=substr ($row['time'],19,-1)) {
        $row['time']=substr($row['time'],0,19).substr($fraction,0,9).substr($row['time'], -1);
    }
    $dt = new \DateTime($row['time']);
    $dt->setTimeZone($o->dateTimeZone);
    //...
}